Part Number Hot Search : 
SR4020PT 4431A 74ACT241 12N50E CA33K032 74ACT241 A2002 GEPS2001
Product Description
Full Text Search
 

To Download TMC429-I Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  motion controller for stepper motors integrated circuits trinamic motion control gmbh & co. kg hamburg, germany tmc429 datasheet intelligent triple stepper motor controller with serial peripheral interfaces and step/direction full compatible successor of the tmc428 b lock d iagram f eatures and b enefits controls up to three stepper motors 3.3 v or 5 v opera tion with cmos / ttl compatible ios serial 4 - wire interface for c with easy -to - use protocol interface for spi? motor drivers with data rates up to 1 mbit/s step/direction interface clock frequency: up to 32 mhz (can use cpu clock) internal position counters 24 bit wide microstep frequency up to 1 mhz read - out option for all motion parameters programmable 6 bit microstep table , up to 64 entries for a quarter sine wave period r amp generators for autonomous positioning / speed control on- the - fly change of target motion parameters power boost automatic acceleration dependent current control low power operation : 1.25 ma at 4 mhz (typ.) compact size: ultra small 16 pin ssop package, small 24 pin sop package, and 32 pin qfn 5x5 mm package directly controls tmc23x, tmc24x, tmc26x, and tmc389 a pplications cctv, security antenna positioning heliostat controller battery powered applications office automation atm, cash recycler , pos lab automation liquid handling medical printer and scanner pumps and valves d escription the tmc429 is a miniaturized stepper motor controller with an industry leading feature set. it controls up to three motors via spi or step/direction interface. the spi interface provides a programmable 6 bit microstep table (64 steps / fullstep) for best step accuracy with 2 - phase stepper motors. based on target positions and velocities - which can be altered on the fly - it performs all real time critical tasks autonomously. the tmc429 off ers high level control functions for robust and reliable operation. two separate 4 wire serial peripheral interfaces allow for communication with the microcontroller and with up to three daisy chained stepper motor drivers. together with a microcontroller the tmc429 forms a complete motion control system. high integration and small form factor allow for miniaturized designs for cost - effective and highly competitive solutions. tmc429 spi to master clk position comparator interrupt controller ref. switch processing step/dir pulse generation output select - spi or - step/dir microstep table serial driver interface 3x ref. switches 3x linear ramp generator spi to stepper motor driver 0/1/2 step/dir out 0/1/2 spi to c sdo to c muliplexed output position compare out
tmc429 datasheet (rev. 2.0 4 / 201 5- jun - 03) 2 www.trinamic.com layout for evaluation of tmc429 with tmc262, tmc261, and tmc260 application examples: reliable control for up to 3 motors the tmc429 scores with its autonomous handling of all real time critical tasks. by offloading the motion - control function to the tmc429, up to three motors can be operated reliably with very little demand for service from the microcontroller. software only needs to send target positions, and the tmc429 generates precisely timed step pulses by hardware for up to three stepper motor driver chips. parameters for each motor can be changed on the fly while software retains full control using an spi bus. this way, high precision and reliable operation is achieved while costs are kept down. controller/driver chain development platform with tmc262 tmc429 o rder c odes order code description size tmc429 - li 3 - axis controller qfn32 - package (5x5mm2), full functionality 5 x 5 mm 2 tmc429 - pi24 3- axis controller sop24 - package (tmc428 replacement possible) 15.5 x 10.5 mm 2 tmc429 -i 3- axis controller ssop16 - package (spi only, for tmc428 replacement) 6 x 5 mm 2 tmc429+26x - eval evaluation board for s/d chipset (tmc429with tmc260, tmc261, tmc262 and tmc424) 16 x 10 2 4224 (42 24 24) 13 2 2 step r ocker ? the tmcm - 1110 steprocker is a single axis motor con troller and driver board for 2- phase bipolar stepper motors. it features the trinamic controller/driver chain consisting of tmc429 and tmc262. the module is intended to be a fully f unctional development platform with 6a mosfets. because of the tmc429s ability to control up to three motors the steprocker can be extended to a full 3 - axes system . tmc429+tmc26 x - eval this evaluation board is a development platform for applications based on the tmc429 in combination with tmc260, tmc261, and tmc262. common supply voltages are +12v dc / +24v dc / +48v dc (tmc261 only). the board features an embedded microcontroller with usb and rs232 interfaces. the control software provides a user - friendly gui for setting control parameters and visualizing the dynamic responses of the motors. motor movements can be controlled via the s tep and direction interface using inputs from an external source or signals generated by the microcontroller acting as a step generator.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 3 www.trinamic.com t able of c ontents 1 principles of operation 4 1.1 k ey c oncepts 4 1.2 c ontrol i nterfaces 5 1.3 s o ftware v isibility 6 1.4 s tep f requencies 6 1.5 m oving the m otor 7 2 genera l definitions, units , and notations 9 2.1 n otations 9 2.2 s ignal p olarities 9 2.3 u nit s of m otion p arameters 9 2.4 r epresentation of s igned v alues by t wo s c omplement 9 3 package variants 10 4 pin assi gnments 10 4.1 p ackage o utlines 11 4.2 s ignal d escriptions 12 5 sample circuits 13 5.1 a pplication e xample : tmc429 in qfn32 p ackage 13 5.2 a pplication e xample : tmc429 in ssop16 p ackage 14 5.3 a pplication e xample : tmc429 with d rivers without s erial d ata o utput (sdo) 14 6 control interface 15 6.1 b us s ignals 15 6.2 s erial p eripheral i nterface for c 15 7 address space partit ions 20 7.1 r ead and w rite 20 7.2 r egister s et 20 7.3 r egister m apping 21 8 register description 22 8.1 a xis p arameter r egisters 22 8.2 g lobal p arameter r egisters 39 9 reference switch inp uts 49 9.1 r eference s witch c onfiguration , mot 1 r , and refmux 49 9.2 t riple s witch c onfiguration 51 9.3 h oming p rocedure 52 9.4 s imultaneous s tart of up to t hree s tepper m otors 52 10 step/dir drivers 53 10.1 t iming 53 11 spi mode driv er interface 54 11.1 b us s ignals 54 11.2 t iming 54 11.3 ram a ddress p artitioning and d ata o rganization 55 11.4 s tepper d river spi d atagram c onfiguration 57 11.5 i nitialization of m icrostep l ook - u p t able 62 12 running a motor 67 12.1 g etting s tarted 67 12.2 r unning a m otor with s tart - s top - s peed in ramp _ mode 67 13 on - chip voltage regu lator 68 14 power - on reset 69 15 absolut e maximum ratings 70 16 electrical character istics 70 16.1 p ower d issipation 70 16.2 dc c haracteristics 71 16.3 t iming c haracteristics 72 18 package machanical d ata 73 18.1 tmc429 - li / qfn32 73 18.2 t mc429 - pi24 / sop24 74 18.4 tmc429 - i / ssop16 75 19 marking 76 20 compatibility information: tmc429 and tmc428 77 20.1 s ignal d escriptions : tmc428 vs . tmc429 77 20.2 tmc428 sdo_c o utput 78 20.3 u nused a ddresses 78 20.4 g eneral t iming p arameters 79 21 disclaimer 80 22 esd sensitive device 80 23 t able of figures 81 24 revision history 82 25 references 83
tmc429 datasheet (rev. 2.0 4 / 201 5- jun - 03) 4 www.trinamic.com 1 principles of operation serial c inte rface 3 x ramp generator 3 x steppuls generator 3x step/dir microstep unit (incl. seuencer) serial driver interface multiple ported ram m u x spi mode 6 voltage regulator gnd power-on re set poscomp interrupt controller ref1 ref2 ref 3 ref1r* ref2r* ref3r* nscs_c sck_c sdi_c nint_sdo_c test sdoz_c* nscs_s / step 2 sck _s / dir 1 sdo_s / step 1 sdi_s / dir 2 nscs3 / dir 3* nscs2 / step 3* 470nf poscmp* clk 4-32mhz gnd die pad gnd gnd 100nf tmc429 gnd v5 /+5v supply or +3v supply * not available with all ic packages. please refer to the package outlines. spi spi / step/dir to driver spi to c connect for +3.3v operation v33 v5 figure 1.1 tmc429 functional block diagram the tmc429 is a miniaturized high performance stepper motor controller with an outstanding cost - performance ratio. it is designed for high volume automotive as well as for demanding industrial motion control applications. once initialized the tmc429 contro ls up to three 2 - phase stepper motors simultaneously. a programmable sequencer for 2 - phase motors is integrated. the tmc429 motion controller is equipped with an spi? host interface with easy -to- use protocol and two driver interfaces (spi and step/dir) fo r addressing various stepper motor driver types. 1.1 key concepts the tmc429 realizes real time critical tasks autonomously and guarantees for a robust and reliable drive. these following features contribute toward greater precision, greater efficiency, high er reliability, and smoother motion in many stepper motor applications. initialization adapt the tmc429 to the driver type and configuration and send initial configuration data to spi drivers. configure microstep resolution and waveform for spi drivers. interfacing the tmc429 offers application specific interfacing via step/dir or spi. positioning the tmc429 operates the motors based on user specified target positions and velocities. modify all motion target parameters on -the- fly during motion. programmin g every parameter can be changed at any time. the uniform access to any tmc429 register simplifies application programming. a read - back option for all internal registers is available. microstepping based on internal position counters the tmc429 performs up to 2 23 (micro)steps completely independent from the microcontroller. microstep resolutions are individually programmable for each stepper motor. the range goes from full stepping (1 microstep = 1 full step) and half stepping (2 microsteps per full step) up to 6 bit micro stepping (64 microsteps per full step) for precise positioning and noiseless stepper motor rotation. with step/dir drivers any microstep resolution is possible as supported by the driver. the internal microstep table can be adapted to specific motor characteristics to further reduce torque ripple, if desired.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 5 www.trinamic.com 1.2 control interfaces 1.2.1 serial c interface from the software point of view, the tmc429 provides a set of registers, accessed by a microcontroller via a serial interface in a uniform way. each datagram contains address bits, a read - write selection bit, and data bits to access the registers and the on - chip memory. each time the microcontroller sends a datagram to the tmc429 it simultaneously receives a datagram from the tmc429. this si mplifies the communication with the tmc429 and makes programming easy. most microcontrollers have an spi hardware interface, which directly connects to the serial four wire microcontroller interface of the tmc429. for microcontrollers without spi hardware software doing the serial communication is sufficient and can easily be implemented. 1.2.2 step/dir driver interface the tmc429 - li controls the motor position by sending pulses on the step signal while indicating the direction on the dir signal. a programmable step pulse length and step frequencies up to 1mhz allow operation at high speed and high microstep resolution. the driver chip converts these signals into the coil currents which control the position of the motor. t he tmc429 - li perfectly fits to the tmc26x smart power step/dir driver family. c high level interface stepper motor driver e.g. tmc260/tmc 261 m motor 3 stepper motor driver e.g. tmc260/tmc261 m motor 2 stepper motor driver e.g. tmc260/tmc261 m motor 1 tmc429 motion controller spi step/dir 1 step/dir 3 step/dir 2 spi figure 1 . 2 application example using step/dir driver interface 1.2.3 serial driver interface the tmc429 automatically generates the required data - stream for spi drivers and provides user configurable microstep waves and motor ramps for up to three motors. the serial interface to the motor drivers is flexibly configurable for different types (from different vendors) with up to 64 bit length for the spi daisy chain. the tmc429 - i perfectly fits to the tmc24x driver family. c high level interface stepper motor driver e.g. tmc236/tmc246 m motor 3 stepper motor driver e.g. tmc236/tmc246 m motor 2 stepper motor driver e.g. tmc236/tmc246 m motor 1 tmc429 motion controller spi spi figure 1 . 3 application example using spi driver interface
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 6 www.trinamic.com 1.3 software visibility from the software poi nt of view the tmc429 provides a set of registers and on - chip ram (see figure 1 . 1 ), accessed via the serial c interface in a uniform way. the serial interface uses a simple protocol with fixed datagram length for the read - and write - access. these registers are used for initializing the chip as required by the hardware configuration. a fterwards the motor can be moved by writing target positions or velocity and acceleration values. 1.4 step frequencies the desired motor velocity is an important design parameter of an application. therefore it is important to understand the limiting factors. 1.4.1 step frequencies using the step/dir driver interface the step pulses can directly be fed to a step/dir driver. the maximum full step rate (fsf max ) depends on the microstep resolution of the external driver chip. the tmc429 microstep rate (sf) is up to 1 /32 of the clock frequency: ? f ??? = f clk 32 e xample for full step frequency calculati on f clk = 16 mhz sf max = 500 khz step resolution of external driver: 16 ? ?? ??? = 500 ??? 16 = 31 . 25 ??? with a standard motor with 1.8 per full step this results in up to 31.25khz/200= 156 rotations per second, which is far above realistic motor velocities for this kind of motor and thus imposes no real limit on the application. a 16 microsteps resolution c an be extrapolated to 256 microsteps within the driver when using the tmc26x driver family. 1.4.2 step frequencies using the spi driver interface the microstep unit with included sequencer processes step pulses from the pulse generator, which represent microstep s, half steps, or full steps (depending on the selected step resolution). the serial driver interface sends datagrams to the stepper motor driver chain whenever a step pulse comes. the theoretical microstep frequency is identical to step/dir mode, but the achievable step frequency may be limited by the spi data rate. maximum spi frequency (bit rate) is clock frequency divided by 16 (when clk2div=7) . an overhead of 1.5 bits is required per datagram. the maximum microstep transmission frequency depends on the total length of the datagrams sent to the spi stepper motor driver chain. e xample for spi data rate calculati on at a clock frequency of 16 mhz, w ith a daisy chain of three spi stepper motor drivers of 12 bit datagram length each (e.g. tmc246), the theoretical maximum spi transmission frequency (fspi max ) is: ???? ??? = 16 ? ?? 16 3 12 + 1.5 this is approximately 27 khz. it is the theoretical upp er limit for the fullstep frequency. in an application, the maximum desired fullstep frequency should be a factor 4 to 8 lower in order to avoid a beat between the step frequency and the spi transmission rate. the microstep rate may be higher than the spi transmission frequency, even if the stepper motor driver does not note all microsteps due to the spi data rate limit. at high step rates (respectively pulse rates) the differences between microstepping and full step excitation vanish.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 7 www.trinamic.com 1.5 moving the motor m oving the motor is simple: - to move a motor to a new target position, write the target position into the associated register by sending a datagram to the tmc429. - to move a motor with a new target velocity , write the velocity into the register assigned to t he stepper motor. 1.5.1 motion controller functionality the ramp generator monitors the motion parameters stored in its registers and calculates velocity profiles. based on the actual ramp generator velocity a pulse generator supplies step pulses to the motor driver. 1.5.2 modes of motion C individually programmable for each axis ramp_mode for positioning applications the ramp_mode is most suitable. the user sets the position and the tmc429 calculates a trapezoidal velocity profile and drives autonomously to the target position. during motion, the position may be alt ered arbitrarily. velocity_mode for constant velocity applications the velocity_mode is most suitable. in velocity_mode , a target velocity is set by the user and the tmc429 takes into account user defined limits of velocity and acceleration. hold_mode in h old_mode , the user sets target velocities, but the tmc429 ignores any limits of velocity and acceleration, to realize arbitrary velocity profiles, controlled completely by the user. soft_mode the soft_mode is similar to the ramp_mode , but the decrease of the velocity during deceleration is done with a soft, exponentially shaped velocity profile. 1.5.3 interrupts the tmc429 has capabilities to generate interrupts. interrupts are based on ramp generator conditions which can be set using an i nterrupt mask. the interrupt controller (which continuously monitors reference switches and ramp generator conditions) generates an interrupt if required. s pecial handling : tmc429 - i / 16- pin package - on 16 - pin package the sdo_c signal becomes a low active interrupt signal called nint_sdo_c while nscs_c is high. set sdo_int=1 to access the non - multiplexed interrupt signal output nint_sdo_c for the other packages. - if the microcontroller disables the interrupt during access to the tmc429 and enables the inter rupt otherwise, the multiplexed interrupt output of the tmc429 behaves like a dedicated interrupt output. - for polling, the tmc429 sends the status of the interrupt signal to the microcontroller with each datagram. 1.5.4 reference switch handling the tmc429 has a left and a right reference switch input for each motor. note, that these inputs are not available with all packages. s pecial handling : tmc429 - i / 16- pin package because of its 16 - pin package the tmc429 - i has only three reference switch inputs: ref1, ref2 , and ref3. therefore the tmc429 - i provides two different modes for reference switch handling: - in the default reference switch mode the three reference switch inputs are defined as left side reference switches, one for each stepper motor. - the second refe rence switch mode defines the first reference input ref1 as left reference switch input of motor one, the second reference input ref2 as left reference switch input of motor two, and the 3rd reference input ref3 as right reference switch input of motor one . in the second reference switch mode there is no reference switch input available for stepper motor three. - with an external multiplexer 74hc157 any stepper motor may have a left and a right reference switch.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 8 www.trinamic.com 1.5.5 integrated programmable step sequencer the s erial spi interface to the stepper motor driver chain has to be configured by an initialization sequence which writes the configuration into the on - chip ram. once configured the serial driver interface works autonomously. the internal multiple port ram con troller of the tmc429 takes care of access scheduling. so, the user may read and write registers and on - chip ram at any time. the registers hold global configuration parameters and motion parameters. the on - chip ram stores the configuration of the serial d river interface and the microstep table. the sequencer internally generates a number of control signals available for transmission to spi driver ics. these sequencer output signals are selected as configured by the internal s tepper motor driver datagram c onfiguration table. during power - on reset, the tmc429 initializes a default configuration within the on - chip ram for an spi driver chain for tmc23x and tmc24x stepper motor drivers. 1.5.6 access to status and error bits s tep /d ir the microcontroller directly controls and monitors the stepper drivers. it also needs to take care for advanced current control, e.g. power down in stand still. spi many serial stepper motor drivers provide status bits (driver active, inactive) and error bits (short to ground, wire open), which are sent back from the stepper motor driver chain to the motion controller. to have access to error bits and datagrams with a total length up to 48 bits the tmc429 buffers the information by means of two 24 bit wi de registers. the microcontroller has direct access to these registers. although, the tmc429 provides datagrams with up to 64 bits to the driver chain, only the last 48 bits sent back from the driver chain are buffered for read out by the microcontroller. buffering of up to 48 bits is sufficient for a chain of three stepper motor drivers. for a chain of three tmc23x / tmc24x stepper motor driver chips all status bits are accessible.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 9 www.trinamic.com 2 general definitions, units, and notations 2.1 notations - decimal numbers are used as usual without additional identification. - binary numbers are identified by a prefixed % character. - hexadecimal numbers are identified by a prefixed $ character. e xample decimal: 42 binary: %101010 hexadecima l: $2a tmc429 datagrams are written as 32 bit numbers , e . g .: $1234abcd = %00 01 0010 0011 0100 1010 1011 1100 1101 t wo to the p ower of n in addition to the basic arithmetic operators (+, - , *, /) the operator two to the power of n is required at different sections of this data sheet. for better readability instead of 2 n the notation 2^n is used. 2.2 signal polarities external and internal signals are high active per default, but the polarity of some signals is programmable to be inver ted. a pre - fixed lower case n indicates low active signals (e.g. nscs_c, nscs_s ). see chapter 8.2 , too. 2.3 units of motion parameters the motion parameters position , velocity , and acceleration are given as integer values within tmc429 specific units. with a given stepper motor resolution one can calculate physical units for angle, angular velocity, angular acceleration. (see chapter 8.1.13 ) 2.4 representation of signed values by twos complement motion parameters which have to cover negative and positive motion dir ection are processed as signed numbers represented by twos complement as usual. limit motion parameters are represented as unsigned binary numbers. s igned m otion p arameters are : v_target / v_actual / a_actual / a_threshold u nsigned m otion p arameters are : v_min / v_max / a_max p ositions x_target / x_actual can be treated as signed or unsigned, as desired.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 10 www.trinamic.com 3 package variants the tmc429 is available in three different package variants, qualified for the industrial temperature range. an additional variant is available for the automotive temperature range. all package variants are rohs compilant. order code package characteristics jedec drawing tmc429 - li qfn32 5x5mm, 32 pins, plastic package, industrial ( - 40 +85c) mo - 220 ? tmc429 - pi24 sop24 300 mils, 24 pins, plastic package, industrial ( - 40 +85c) ms - 013 (300 mils) tmc429 - i ssop16 150 mils, 16 pins, plastic package, industrial ( - 40 +85c) mo - 137 (150 mils) 4 pin assignments the three package variants of the tmc429 offer different signal sets for various applications: type package compatibility remarks tmc429 - li qfn32 - f ull functionalit including spi and step/dir drier interfaces for up to th ree stepper motor drier chips - fits best to tc2x and tc3 tc2 - pi2 sop2 tc2 - pi2 replacement - spi interface for u p to three stepper drier chips - step/dir interface for u p to three stepper driver chips - t he right reference switch for motor 3 is not available . tmc429 - i ssop16 tmc428 - i replacement - spi interface for up to three stepper motor drier chips complements the tc2x - step/dir interface for up to two motors . - t he additional reference right side switch inputs ref1r, ref2r, and ref3r are not available. - a n additional multiplexer 74hc157 might be necessary. the multiplexing control signal is only available in spi stepper motor driver chain mode. some third party spi stepper motor drivers have no serial data output and therefore cannot simply be arranged in a daisy chain to drive more than one motor. the package variants sop24 and qfn32 have two additional driver selection outputs ns cs2 and nscs3 for stepper motor drivers without serial data output. all inputs are schmitt - trigger. unused inputs (ref1, ref2, ref3, and sdi_s) need to be connected to ground. unused reference switch inputs have to be connected to ground, too. a pull - dow n resistor is necessary at the sdi_s input of the tmc429 for those serial peripheral interface stepper motor drivers that set their serial data output to high impedance z while inactive. step function outputs are s1, s2, and s3. corresponding dir outputs are d1, d2, and d3. the multiplexed output nint _sdo_c of tmc429 - li and tmc429 - pi24 can be configured in a de - multiplexed mode. an additional output named poscmp is available for triggering when moving over a programmable position. attention - after power on - reset, the tmc429 starts in tmc428 mode. that is, because the tmc429 is a 100% compatible successor of the tmc428 motion controller. additional outputs of the tmc429 including specific functions have to be activated by dedicated tmc429 confi guration registers. - preferably, long wires to the reference switch inputs (ref1, ref2, and ref3) should be avoided. for long wires, a low pass filter for spike suppression should be provided (refer the tmc429 evaluation board schematic as example).
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 11 www.trinamic.com 4.1 pack age outlines tmc 429-i v33 nscs_c gnd sdi_c test v5 sck_c sdi_s_d2 nint_sdo_c clk nscs_s_s2 ref2 ref1 ref3 sck_s_d1 sdo_s_s1 1 2 3 4 5 6 7 8 16 10 11 12 13 14 15 9 ssop16 (150 mils) tmc429-pi24 v33 nscs_c gnd sdi_c test v5 sck_c sdi_s_d2 nint_sdo_c clk nscs_s_s2 ref2 ref1 ref3 sck_s_d1 sdo_s_s1 3 4 5 6 7 8 9 10 23 15 16 17 20 21 22 14 1 2 11 12 24 13 18 nscs2_s3 19 nscs3_d3 sop24 (300 mils) v5 gnd refr1 [n.c. @ tmc428] refr2 [n.c. @ tmc428] [n.c. @ tmc428] poscmp [n.c. @ tmc428] sdoz_c tmc429-li nscs_c test sck_c clk ref2 ref3 3 4 5 6 7 8 9 1 2 qfn32 5x5mm v5 gnd n.c. 10 11 12 13 14 15 16 32 31 30 29 28 27 26 25 22 21 20 19 18 17 24 23 ref1 n.c. sdi_c n.c. sdoz_c refr2 nint_sdo_c sdo_s_s1 n.c. sck_s_d1 nscs_s_s2 nscs2_s3 nscs3_d3 v5 v33 gnd n.c . sdi_s_d2 refr1 refr3 poscmp gnd n.c. figure 4 . 1 tmc429 pin out please refer to the a pplication note pcb_guidelines_trinamic_packages for a practical guideline for all available trinamic ic packages and pcb footprints. the application note covers package dimensions, example footprints and general information on pcb footprints for these packages. it is available on www.trinamic.com .
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 12 www.trinamic.com 4.2 signal descriptions pin ssop16 sop24 qfn32 in/out description reset - - - - internal power - on reset . no external reset input pin is available. clk 5 7 5 i clock input nscs_c 6 9 7 i low active spi chip select input driven from c sck_c 7 10 8 i serial data clock input driven from c sdi_c 8 11 10 i serial data input driven from c nint_sdo_c 9 14 14 o serial data output to c input / multiplexed ninterrupt output if communication with c is idle (resp. nscs_c = 1) sdo_c will never be high impedance; the tmc429 is equipped with an additional pin named sdoz_c that becomes high impedance when nscs_c=1. nscs_s_s2 12 17 18 o spi chip select signal to stepper motor driving chain step output s2 (for motor 2) in step/dir mode nscs2_s3 - 18 19 o spi chip select signal (sop24 only) / step output s3 (for motor 3) in step/dir mode nscs3_d3 - 19 20 o spi chip select signal (sop24 only) / dir output d3 (for motor 3) in step/dir mode sck_s_d1 11 16 17 o serial data clock output to spi stepper motor driver chain / dir output d1 (for motor 1) in step/dir mode sdo_s_s1 10 15 15 o serial data output to spi stepper motor driver chain / step output s1 (for motor 1) in step/dir mode sdi_s_d2 16 23 27 i o serial data input from spi stepper motor driver chain ( pull - up/ - down resistor at sdi_s avoids high impedance; sdi_s input is the power - on default) / dir output d2 (for motor 2) in step/dir mode ref1 1 2 31 i reference switch input 1 (n o internal pull -up resistor) ref2 2 3 1 i reference switch input 2 (n o internal pull - up resistor) ref3 3 4 2 i reference switch input 3 (n o internal pull - up resistor) v5 13 5, 20 3, 21 +5v supply / +3.3v supply v33 14 21 22 470nf ceramic capacitor pin / +3.3v supply gnd 15 8, 22 6, 23, 25 ground test 4 6 4 i must be connected to gnd as close as possible to the chi p . no user function. n.c. - - 9, 11, 16, 24, 26, 32 - not connected pins poscmp - 1 30 n.c. / o position compare output for sop24 and qfn32 / output for pos_comp function sdoz_c - 12 12 o / z sdoz_c becomes high impedance (z) when nscs_c=1 / the nint signal is not mapped to sdoz_c pin / the pin nint_sdo_c can be configured with tmc429 register to give the nint signal directly without multiplexing refr1 - 24 28 i reference switch right 1 input only available for tmc429 in sop24 package and qfn32 package ( with internal pull - up resistor) refr2 - 13 13 i reference switch right 2 input only available for tmc429 in sop24 package and qfn32 package (with internal pull - up resistor) refr3 - - 29 i reference switch right 3 input only availa ble for tmc429 in qfn32 package (with internal pull - up resistor)
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 13 www.trinamic.com 5 sample circuits the sample circuits show the connection of the external components. 5.1 application example: tmc429 in qfn32 package all signals of the tmc429 are available with the qfn32 package. we recommend this package for applications using trinamics tmc2 6 x smart power driver family. sck_s_d1 sdo_s_s1 sdi_s_d2 nscs_s_s2 ref2 ref3 ref1 test gnd sdi_c nscs_c sck_c nint_sdo_c clk v5 v33 tmc429-li nscs3_d3 nscs2_s3 poscmp refr3 refr2 refr1 sdoz_c stp_3 dir_3 stp_2 dir_2 stp_1 dir_1 miso mosi sck nscs c tmc26x tmc26x tmc26x figure 5 . 1 tmc429 within qfn32 package step dir csn sck sdi sdo tmc26x #1 step dir csn sck sdi sdo tmc26x #2 step dir csn sck sdi sdo tmc26x #3 nscs2_s3 nscs3_d3 nscs_s_s2 sdi_s_d2 sdo_s_s1 sck_s_d1 nscs_c sck_c sdi_c sdoz_c mosi miso sck tmc429-li csn_0 csn_1 csn_2 csn_3 clk clk 100k figure 5 . 2 tmc429 / tmc26x outline for configuration via spi and step/dir for motion a pplication environme nt of tmc429 (qfn32 package ) and 3 x tmc26 x stepper motor driv er : - one spi chip select signal csn_0 selects the tmc429 spi microcontroller interface. - up to th ree spi chip select signals (csn_3, csn_2, csn1) select up to three tmc262 spi for configuration. - the tmc429 sdoz_c is high impedance when nscs_c is 1.
tmc429 datasheet (rev. 2.0 4 / 201 5- jun - 03) 14 www.trinamic.com 5.2 application example: tmc429 in ssop16 package the low - prized tmc429 - i is an optimum choice for spi stepper motor drivers if the additional functions of the tmc429 - li are not required. we recommend this package for trinamics tmc23 x and tmc24x stepper driver family. 10k sck_s sdo_s sdi_s nscs_s sdo csn sdi sck sdo csn sdi sck sdo csn sdi sck tmc23x / tmc24x tmc23x / tmc24x tmc23x / tmc 24x ref2 ref3 ref1 test gnd c sck mosi miso ss sdi_c nscs_c sck_c sdo_c clk clk v5 v33 470 nf +5 v 1k 1k reference switch inputs active high sm#3 sm#2 sm#1 tmc429-li 1k 100 nf output sdo_c will nerver be high impedance 10nf 10nf 10nf 4.7k 4.7 k 4.7k optional filter for long cables and to avoid failure if switch wires are next to motor cables. figure 5.3 tmc429 application environment with tmc429 in ssop16 package 5.3 application example: tmc429 with drivers without serial data output (sdo) for driver chips without serial data output the tmc429 - li and the tmc429 - pi24 with two additional chip select outputs are available. the tmc429 sends data to the driver chain on demand only, which minimizes the interface traffic and reduces the power consumption. 10k sck_s sdo_s sdi_s nscs_s nscs sdi sck nscs sdi sck nscs sdi sck driver w/ o sdo driver w/ o sdo ref2 ref3 ref1 test gnd c sck mosi miso ss sdi_c nscs_c sck_c sdo_c/ sdoz_c clk clk v5 v33 470 nf + 5 v sm#3 sm#2 sm#1 tmc429- li / tmc429-pi24 nscs2 nscs3 v5 gnd output sdo_ c will nerver be high impedance driver w/ o sdo refr1 refr2 refr3 figure 5.4 usage of drivers without serial data output (sdo) with tmc429 in sop24 or in qfn32 packages
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 15 www.trinamic.com 6 control interface the communication takes place via four wire serial interfaces and 32 bit datagrams of fixed length. stepper motor drivers with parallel inputs can be used in connection with the tmc429 with some additional glue logic. r esponsibilities are defined as follows : - the microcontroller is master of the tmc429. - the tmc429 is master of the stepper motor driver daisy chain. a utomatic power - on reset : - the tmc429 cannot be accessed before the power - on reset is completed and the clock is stable. - all register bits are initialized with 0 during power - on - reset, except the spi clock pre - divider clk2_div that is initialized with 15 (see section 8.2.5.3 ). 6.1 bus signals signal description tmc429 microcontroller bus clock input sck_c serial data input sdi_c serial data output sdo_c chip select input nscs_c 6.2 serial peripheral interface for c the serial microcontroller interface of the tmc429 acts as a 32 bit shift register. c ommunica tion between c and the tmc429 1. the serial c interface shifts serial data into sdi_c with each rising edge of the clock signal sck_c. 2. then, it copies the content of the 32 bit shift register into a buffer register with the rising edge of the selection signal nscs_c. 3. the serial interface of the tmc429 immediately sends back data read from registers or read from internal ram via the signal sdo_c. 4. the signa l sdo_c can be sampled with the rising edge of sck_c. sdo_c becomes valid at least four clk clock cycles after sck_c becomes low as outlined in the timing diagram. 6.2.1 timing a complete serial datagram frame has a fixed length of 32 bit. because of on - the - fly processing of the input data stream, the serial c interface of the tmc429 requires the serial data clock signal sck_c to have a minimum low / high time of three clock cycles. the spi signals from the c interface may be asynchronous to the clock signal cl k of the tmc429. if the microcontroller and the tmc429 work on different clock domains that run asynchronous ly by the timing of the spi interface of the microcontroller should be made conservative in the way that the length of one spi clock cycle equals 8 or more clock cycles of the tmc429 clock clk.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 16 www.trinamic.com t sd t sd clk sdi _ c _ bit #31 t sckcl t sckch t sucsc t hdcsc 1 x sdi_c sampled one full 32 bit datagram sdo_c (for TMC429-I) sdi_c sck_c nscs_c sdi_c_bit#30 . . . sdi_c_bit#1 30 x sampled sdi_c sdi_c_bit#0 1 x sdi_c sampled t clk t datagramuc t pd t is t sd t si t hdcsc t sucsc sdo_c_bit#31 sdo_c_bit#30 ... sdo_c_bit#1 sdo_c_bit#0 nint sdo_c_bit#31 sdo_c_bit#30 ... sdo_c_bit#1 sdo_c_bit#0 nint sdoz_c figure 6 . 1 timing diagram of the serial c interface e xplanatory notes - while the data transmission from the microcontroller to the tmc429 is idle, the low active serial chip select input nscs_c and also the serial data clock signal sck_c are set to high. - while the signal nscs_c is high, the tmc429 assigns the status of the internal low active interrupt signal nint to the serial data output sdo_c. - the data signal sdi_c driven by the microcontroller has to be valid at the rising edge of the seria l data clock input sck_c. the maximum duration of the serial data clock period is unlimited. - while the c interface of the tmc429 is idle, the sdo_c signal is the (active low) interrupt status nint of the integrated interrupt controller of the tmc429. the timing of the multiplexed interrupt status signal nint is characterized by the parameters t is an d t si (see chapter 16.3 ). the following spi clock frequencies are recommended in order to avoid possible issues concerning the spi frequency between microcontroller and tmc429: - for fclk = 16mhz an upper spi clock frequency of 1mhz is recommended. - for fclk = 32mhz an upper spi clock frequency of 2mhz is recommen ded. procedure of data tr ansmission 1. the signal nscs_c has to be high for at least three clock cycles before starting a datagram transmission. to initiate a transmission, the signal nscs_c has to be set to low. 2. three clock cycles later the serial data cloc k may go low. 3. the most significant bit (msb) of a 32 bit wide datagram comes first and the least significant bit (lsb) is transmitted as the last one. 4. a data transmission is finished by setting nscs_c high three or more clk cycles after the last rising s ck_c slope. 5. so, nscs_c and sck_c change in opposite order from low to high at the end of a data transmission as these signals change from high to low at the beginning. information for tmc429 - i / 16 - pin package in contrast to most other spi compatible devices, the serial data output sdo_c of the tmc429 - i is always driven. it will never be high impedance z. if high impedance is required for the sdo_c connected to the microcontroller, it can be realized using a sin gle gate 74hct1g125. an additional pin named sdoz_c is available for the tmc429 with an integrated high impedance driver.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 17 www.trinamic.com sck _ s sdo _ s sdi _ s nscs _ s ref 2 ref 3 ref 1 test gnd clk v 5 v 33 tmc 429 sck _ c sdi _ c nscs _ c sdoz _ c sck _ c sdi _ c nscs _ c sdoz _ c nint _ sdo _ c nint figure 6 . 2 the tmc429 has a high impedance pin sdoz_c. the nint_sdo_c can be configured as non multiplexed interrupt output nint if required. t iming characteristic s of the serial micr ocontroller interfac e symbol parameter min typ max unit tsucsc setup clocks for nscs_c 3 clk periods thdcsc hold clocks for nscs_c 3 clk periods tsckcl serial clock low 3 clk periods tsckch serial clock high 3 clk periods tsd sdo_c valid after sck_c low 2.5 3.5 clk periods tis ninterrupt status valid after nscs_c low 2.5 clk periods tsi sdo_c valid after nscs_c high 4.5 clk periods tdamagramuc datagram length 3+3+32*6= 198 clk periods tdamagramuc datagram length 12.375 s fclk clock frequency 0 32 mhz tclk clock period tclk = 1 / fclk 31.25 ns tpd clk - rising - edge -to - output propagation delay 5 ns 6.2.2 datagram structure the c communicates with the tmc429 via the four wire serial interface. each datagram sent to the tmc429 via the pin sdi_c and each datagram received from the tmc429 via the pin sdo_c is 32 bits long. the first bit sent is the most significant bit (msb) sdi_c_bit#31. the last bit sent is the least significant bit (lsb) sdi_c_bit#0 (see figure 6 . 1 ). during the reception of a datagram, the tmc429 immediately sends back a datagram of the same length to the microcontroller. this return datagram consists of requested read data in the lower 24 datagram bits and status bits in the higher 8 datagram bits. a read request is distinguished from a write request by the read/not write datagram bit (rw) . 6.2.2.1 datagrams sent to the tmc429 the datagrams sent to the tmc429 are assorted in four groups of bits : rrs the register ram select (rrs) bit selects either registers or the on - chip ram. address address bits address memory within the register set or within the ram area. rw the read / not write (rw) bit distinguishes between read access and write acce ss: read: rw = 1 / write rw = 0. data data bits are only for write access. for read access these bits are not used ( dont care ) and should be set to 0. msb 32 bit datagram sent from c to the tmc429 via pin sdi_c lsb 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 18 www.trinamic.com n ote - different internal registers of the tmc429 have different lengths. for some registers only a subset of 24 data bits is used. - unused data bits should be set to 0. - some addresses select a couple of registers mapped together into the 24 data bit space. 6.2.2.2 datagrams received by c from the tmc429 the datagrams received by the c from the tmc429 contain two groups of bits: status bits the status bits, sent back with each datagram, comprehend the most important internal status bits of the tmc429 and the settings of the reference switches data bits data bits are only for write access. the most significant bit msb is received first; the least significant bit lsb is received last. t he tmc429 only sends datagrams on demand. msb 32 bit datagram sent back from the tmc429 to c via pin sdo_c lsb 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 status bits data bits int cdgw s3 s2 s1 rs3 xet3 rs2 xet2 rs1 xet1 s tatus information bi ts int the status bit int is the internal high active interrupt controller status output signal . handling of interrupt conditions without using interrupt techniques is possible by polling this status bit. the interrupt signal is also directly available at the sdo_c pin of the tmc429 (set sdo_int=1 in if_configuration_429 register). the pin sdo_c may directly be connected to an interrupt input of the microcontroller. since the sdo_c / nint output on tmc429 - i (16 - pin package) is multiplexed, the microcontroller has to disable its interrupt input while it sends a datagram to the tmc429. the sdo_c signal driven by the tmc429 alternates during datagram transmission. cdgw the cdgw cover datagram waiting bit is a handshake signal for the microcontroller. it shows the state of a datagram covering mechanism that is necessary for direct configuration data transmission to the stepper motor driver chain, e.g. for configuring the drivers in the initialization phase. the cdgw status bit also gives the status of the datagram_high_word and datagram_low_word . r s3, rs2, rs1 the status bits rs3, rs2 and rs1 represent the s tate of the left reference switch inputs. they are also access ible in register %1111100 as l3, l2 and l1. xeqt3, xeqt2, xeqt1 the three status bits xeqt3, xeqt2, and xeqt1 indicate individually for each stepper motor, if it has reached its target position. the status bits r1, r2, r3 and l1, l2, l3 and bits xeqt3, x eqt2, and xeqt1 can trigger an interrupt or enable simple polling techniques.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 19 www.trinamic.com 6.2.3 simple datagram examples the % prefix C normally indicating binary representation in this data sheet C is omitted for the following datagram examples. assuming, one would like to write (rw=0) to a register (rrs= 0 ) at the address % 001101 the following data word %0000 0000 0000 0001 0010 0011, one would have to send the following 32 bit datagram 0 001101 0 000000000000000100100011 to the tmc429. with inactive interrupt ( int =0), no cover datagram waiting ( cdgw =0), all reference switches inactive (rs3=0, rs2=0, rs1=0), and all stepper motors at target position (xeqt3=1, xeqt2=1, xeqt1=1) the status bits would be % 10010101 the tmc429 would send back the 32 bit datagram: 10010101 000 000000000000000000000 to read (rw= 1 ) back the register written before, one would have to send the 32 bit datagram 0 001101 1 000000000000000000000000 to the tmc429 and the tmc429 would reply with the datagram 10010101 000000000000000100100011. write (rw=0) access to on - chip ram (rrs= 1 ) to an address %111111 occurs similar to register access, but with rrs= 1 . to write two 6 bit data words %100001 and %100011 to successive pair - wise ram addresses % 111111 0 and % 111111 1 (%100001 to % 111111 0 and %100011 to % 111111 1) which are commonly addressed by one datagram, one would have to send the datagram 1 111111 0 000000000010001100100001. to read (rw= 1 ) from that on - chip memory address, one would have to send the datagram 1 111111 1 000000000000000000000000.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 20 www.trinamic.com 7 add ress space partitions the functionality of the tmc429 is mapped to registers which are combined to groups and mapped to the address space : - each stepper motor has a set of registers individually assigned to it and arranged within a contiguous address space. - a set of registers within the address space holds the global parameters which are common for all stepper motors. a single dedicated globa l parameter register is essential for the configuration of the serial four wire stepper motor driver interface. - one half of the on - chip ram address space holds the configuration parameters for the stepper motor driver chain ( used for spi mode, only ) . - the other half of the on - chip ram address space is provided to store a microstep table if required ( used for spi mode, only ) . - the first seven datagram bits ( sdi_c_bit#31 and sdi_c_bit#30 ... sdi_c_bit#25 , respectively rrs and address ) address the whole addre ss space of the tmc429. a ddress space partiti ons address ranges (incl. rrs ) assignment % 0 00 0000 . . . % 0 00 1111 16 registers for stepper motor #1 registers with up to 24 bits % 0 01 0000 . . . % 0 01 1111 16 registers for stepper motor #2 % 0 10 0000 . . . % 0 10 1111 16 registers for stepper motor #3 % 0 11 0000 . . . % 0 11 1110 15 common registers % 0 11 1111 1 global parameter register % 1 00 0000 . . . % 1 01 1111 32 addresses of 2x6 bit for driver chain configuration ram 128x6 bit % 1 10 0000 . . . % 1 11 1111 32 addresses of 2x6 bit for microstep table c hanging target posit ion or target veloci ty of single motors the stepper motors are controlled directly by writing motion parameters into associated registers. only one register write access is necessary for changing a target motion parameter. thus the microcontroller has to send one 32 bit datagram to the tmc429 for altering the target position or the target velocity of one stepper motor. c hanging driver confi guration or microste p table of all motor s some parameters are packed together in a single data word at a single address. these parameters have to be initialized once and remain unchanged during operation. they have to be changed in common . the access to the on - chip ram addresses concern two successive ram addresses. so, always two data words a re modified with each write access to the on - chip ram. once initialized after power - up, the content of the ram is usually left unchanged. 7.1 read and write read and write access is selected by the rw bit (sdi_c_bit#24) of the datagram sent from the c to th e tmc429. the on - chip configuration ram and the registers are writeable with read - back option. some addresses are read - only. write access (rw=0) to some of those read - only registers triggers additional functions, explained in detail later. 7.2 register set the register address mapping is given in chapter 7.3 . the registers are initialized internally during power - up. during power - up initialization, the tmc429 does not send any datagrams to the stepper motor driver chain. the tmc429 loads a default ram configuration for a tmc236 / tmc239 / tmc246 / tmc249 spi driver chain on power - on reset. for a step/dir driver chain this is of no relevance.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 21 www.trinamic.com 7.3 register mapping all register bits are initialized with 0 during power on reset, except the spi clock pre - divider clk2_div (see section 8.2.5.3 ) that is initialized with 15. the on - chip ram of the tmc429 is initialized internally during power - up. it can be modified by the microcontroller as required. tmc429 register mapping 32 bit datagram sent from c to the tmc429 via pin sdi_c 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data 0 smda idx rw=0 : write access / rw=1 : read access t hree stepper motor r egister sets ( smda ={00, 01, 10}) 0 0 1 0 1 0 0 0 0 0 x_target 0 0 0 1 x_actual 0 0 1 0 v_min 0 0 1 1 v_max 0 1 0 0 v_target 0 1 0 1 v_actual 0 1 1 0 a_max 0 1 1 1 a_actual 1 0 0 0 is_agtat is_aleat is_v0 a_threshold 1 0 0 1 1 pmul pdi v 1 0 1 0 lp ref_conf r_m 1 0 1 1 interrupt_mask interrupf_flags 1 1 0 0 pulse_div ramp_div usrs 1 1 0 1 dx_ref_tolerance 1 1 1 0 x_latched 1 1 1 1 ustep_count_429 1 1 jdx c ommon registers ( smda =11) 0 0 0 0 datagram_low_word 0 0 0 1 datagram_high_word 0 0 1 0 cw cover_position cover_len 0 0 1 1 cover_datagram 0 1 0 0 if _configuration_429 0 1 0 1 pos_comp_429 0 1 1 0 pos_comp_int_429 m i 1 0 0 0 p ower - down 1 0 0 1 type_version_429 (= $429101 for tmc429 version 1.01, read - only) 1 1 1 0 l3 r3 l2 r2 l1 r1 1 1 1 1 1 1 mot1r refmux cont_update clk2_div cs_comind polarities lsmd dac_ab fd_ab ph_ab sck_s nscs_s 0 0 0 0 stpdiv_429 (if en_sd =1) smda = stepper motor driver address m = mask r_m = ramp_mode i = interrupt cw = cover waiting rrs = register ram select l1, l2, l3 = left switch 1/2/3 (read - out) r1, r2, r 3 = right switch 1/2/3 (read - out) unused bits
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 22 www.trinamic.com 8 register description the tmc429 provides axis parameter registers and global parameter registers. 8.1 axis parameter registers the registers hold binary coded numbers. some are unsigned (positive) numbers, some are signed numbers in twos complement, and some are control bits or single flags. the functionality of different registers depends on the ramp_mode (refer to chapter 8.1.11 ). o verview axis parameter regis ter m apping r egister r / w t ype d escription x_target r/w 24 bit this register holds the current target position in units of microsteps. positions can be treated as signed or unsigned. x_actual r/w* 2 24 bit the current position of each stepper motor is available by read out of this register. positions can be treated as signed or unsigned. v_min r/w 11 bit unsigned this register holds the absolute velocity value at or below which the stepper motor can be stopped abruptly. v_max r/w 11 bit unsigned this parameter sets the maximum motor velocity. v_target r/w 12 bit signed the v_target register holds the current target velocity. the use of v_target depends on the chosen mode of operation. v_actual r* 1 12 bit signed this read - only register holds the current velocity of the associated stepper motor. a_ max r/w 11 bit unsigned this register defines the absolute value of the desired acceleration for velocity_mode and ramp_mode (resp. soft_mode ) with a value range from 0 to 2047. a_actual r 12 bit signed the actual acceleration can be read out by the microcontroller from the a_actual read - only register. is_agtat is_aleat is_v0 a_threshold r/w r/w r/w r/w 3 bit 3 bit 3 bit 11 bit unsigned these parameters control the current scaling values i s in spi driver mode. depending on the ramp phase they are applied to the motor by scaling the amplitudes of the internal sequencer. pmul pdiv r/w r/w 1+7 bit 4 bit unsigned these values form a floating point number with pmul as mantissa and pdiv as exponent. pmul and pdiv are used for calculating the deceleration ramp. ramp_mode ref_conf lp r/w r/w r 2 bit 4 bit 1 bit the two bits ramp_mode ( r_m ) select one of the four possible modes of operation . the configuration bits ref_conf select the behavior of the reference switches. the bit called lp (latched position) is a read only status bit. interrupt_mask interrupt_flags r/w r/w 8 bit 8 bit the tmc429 provides one interrupt register of eight flags for each stepper motor. ramp_div pulse_div usrs r/w r/w r/w 4 bit 4 bit 2 bit the parameter ramp_div scales the acceleration parameter a_max. the pulse generator clock C defining the maximum step pulse rate C is determined by the parameter pulse_div . the parameter pulse_div scales the velocity parameters. the parameter usrs (step resolution selection) i s used for setting the microstep resolution in spi mode. dx_ref_tolerance r/w 12 bit dx_ref_tolerance excludes a motion range to allow motion near the reference position. x_latched r 24 bit unsigned this read - only register stores the actual position x_actual upon a change of the reference switch state. ustep_count_429 r/w 8 bit the read - write register ustep_count_429 holds the actual microstep pointer of the internal sequencer. * 1 in hold_mode only, this register is a read - write register. * 2 before o verwriting x_actual choose velocity_mode or hold_mode . refer to chapter 8.1.2 .
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 23 www.trinamic.com 8.1.1 x_target (idx=%0000) this register holds the current target position in units of microsteps. u nit of target positi on the unit of the target position depends on the setting of the associated microstep resolution register usrs . p ositioning - if the difference x_target to x_actua l is not zero and r_m = ramp_mode or soft_mode , the tmc429 moves the stepper motor in the direction of x_target in order to position x_actual to x_target . usually x_target is modified to start a positioning. - the condition | x_target C x_actual | < 2 23 mus t be satisfied for motion into correct direction. - target position x_target and current position x_actual may be altered on the fly. - to move from one position to another, the ramp generator of the tmc429 automatically generates ramp profiles in considerat ion of the velocity limits v_min and v_max and acceleration limit a_max . the registers x_target , x_actual , v_min , v_max , and a_max are initialized with zero after power up. 8.1.2 x_actual (idx=%0001) the current position of each stepper motor is available by read out of the registers called x_actual . the actual position can be overwritten by the microcontroller. this feature is important for the reference switch position calibration controlled by the m icrocontroller. u nit of current posit ion the unit of the target position depends on the setting of the associated microstep resolution register usrs . attention before o verwriting x_actual choose velocity_mode or hold_mode . if x_actual is overwritten in ramp_mode or soft_mode the motor directly drives to x_target .
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 24 www.trinamic.com 8.1.3 v_min (idx=%0010) this register holds the absolute velocity value at or below which the stepper motor can be stopped abruptly. u nit of velocity the unit of velocity paramet ers is steps per time unit . the scale of velocity parameters ( v_min , v_max , v_target , v_actual ) is defined by the parameter pulse_div (see page 8.1.13 for details) and depends on the clock frequency of the tmc429. d eceleration - the parameter v_min is relevant for deceleration while reaching a target position. v_min should be set greater than zero. - this control value allows reaching the target position faster because the stepper motor is not slowed down below v_min before the target is reached. - due to the finite numerical representation of integral relations the target position cannot be rea ched exactly, if the calculated velocity is less than one, before the target is reached. setting v_min to at least one assures reaching each target position exactly. t v(t) t 0 t 1 a _ max t 3 t 4 t 2 v t 7 t 8 t 5 v a_max - a_max - a_max t 6 acceleration constant velocity deceleration acceleration deceleration t 01 t 56 figure 8 . 1 velocity ramp parameters and velocity profiles 8.1.4 v_max (idx=%0011) this parameter sets the maximum motor velocity. the absolute value of the velocity will not exceed this limit, except if the limit v_max is changed during motion to a value below the current velocity. u nit of velocity the unit of velocity parameters is steps per time unit . the scale of velocity parameters ( v_min , v_max , v_target , v_actual ) is defined by the parameter pulse_div (see page 8.1.13 for details) and depends on the clock frequency of the tmc429. h oming procedure to set target position x_target and current position x_actual to an equivalent value (e.g. to set both to zero at a reference point) the assigned stepper motor should be stopped first and the parameter v_max should be set to zero to hold the assigned stepper motor at rest before writing into the register x_target and x_actual . attention before o verwriting x_actual choose velocity_mode or hold_mode . if x_actual is overwritten in ramp_mode or soft_mode the motor directly drives to x_target .
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 25 www.trinamic.com 8.1.5 v_target (idx=%0100) the use of v_target depends on the chosen mode of operation: mode of operation functionality of v_target ramp_mode the v_target register holds the current target velocity calculated internally by the ramp generator. velocity_mode a target velocity can be written into the v_target register. the associated stepper motor accelerates until it reaches the specified target velocity. the velocity is changed according to the motion parameter limits if the register v_target is changed. hold_mode the register v_target is ignored. soft_mode the v_target register holds the current target velocity calculated internally by the ramp generator. u nit of velocity the unit of velocity parameters is steps per time unit . the scale of velocity parameters ( v_min , v_max , v_target , v_actual ) is defined by the parameter pulse_div (see chapter 8.1.13 for details) and depends on the clock frequency of the tmc429. 8.1.6 v_actual (idx=%0101) this read - only register h olds the current velocity of the associated stepper motor. internally, the ramp generator of the tmc429 processes with 20 bits while only 12 bits (the most significant bits) can be read out as v_actual . in hold_mode only, this register is a read - write register. writing zero to the register v_actual immediately stops the associated stepper motor, because hidden bits are set to zero with each write access to the register v_actual . in hold_mode motion parameters are ign ored and the microcontroller has the full control to generate a ramp. the tmc429 only handles the microstepping and datagram generation for the associated stepper motor of the daisy chain. u nit the unit of velocity parameters is steps per time unit . the s cale of velocity parameters ( v_min , v_max , v_target , and v_actual ) is defined by the parameter pulse_div (see chapter 8.1.13 for details) and depends on the clock f requency of the tmc429. an actual velocity of zero read out by the microcontroller means that the current velocity is in an interval between zero and one . therefore the actual velocity should not be used to detect a stop of a stepper motor. it is advised to detect the target_reached flag instead. 8.1.7 a_max (idx=%0110) this register defines the absolute value of the desired acceleration for velocity_mode and ramp_mode (resp. soft_mode ) with a value range from 0 to 2047. note the motion controller cannot stop the stepper motor if a_max is set to zero on the fly because afterwards the velocity cannot be changed automatically any more. u nit the unit of the acceleration is change of step frequency per time unit divided by 256 . th e scale of acceleration parameters ( a_max , a_actual , and a_threshold ) is defined by the parameter ramp_div (see section 8.1.13 ) and depends on the clock frequency o f the tmc429. 8.1.7.1 a_max in ramp_mode as long as ramp_div pulse_div C 1 is valid, any value of a_max within its range (0 2047) is allowed and there exists a valid pair { pmul , pdiv } for each a_max . the reason is that the acceleration scaling determined by ramp_div is compatible with the step velocity scaling determined by pulse_div . a large ramp_div stands for low acceleration and a large pulse_div stands for low velocity. low acceleration is compatible with low speed and high speed as well, but high accele ration is more compatible with high speed.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 26 www.trinamic.com changing one parameter out of the triple { a_max , ramp_div , pulse_div } requires re - calculation of the parameter pair { pmul , pdiv } to update the associated register. for description of the parameters pmul and pdiv see section 8.1.10 . 8.1.7.1.1 deceleration in ramp_mode and soft_mode if ramp_div and pulse_div differ more than one while deceleration in ramp_mode or soft_mode the parameter a_max needs to have a lower limit (>1) and an upper limit (<2047). the reason is that the deceleration ramp is internally limited to 2 19 steps (respectively microsteps). t he lower limit of a_max is given by ? _ ?? ? ????? _ ????? = 2 ( ? ?? ? _ ? ? ? ? ? ? ? ?? _ ? ? ? ? 1 ) - with v_max set to 2048 2 ( | 1448) or lower the a_max lower_limit is half of this value. - if ramp_div C pulse_div C 1 d 0 the limit a_max lower_limit is 1 and the parameter a_max may be set to 1. t he upper limit of a_max is given by ? _ ?? ? ????? _ ????? = 2 ( ? ?? ? _ ? ? ? ? ? ? ? ?? _ ? ? ? + 12 ) - 1 - if ramp_div C pulse_div + 1 t 0 the a_max_upper_limit is > 2048 and the parameter a_max might be set to any value up to 2047. c onditions the parameter a_max must no t be set below a_max lower_limit except a_max is set to 0. the condition a_max t a_max lower_limit as well as a_max d a_max upper_limit must be satisfied to reach any target position without oscillations. if that condition is not satisfied, oscillations around a target position may occur. 8.1.8 a_actual (idx=%0111) the actual acceleration can be read out by the microcontroller from the a_actua l read - only register. the actual acceleration is used to select scale factors for the coil currents. it is updated with each clock. the returned value a_actual is smoothed to avoid oscillations of the readout value. thus, returned a_actual values should no t be used directly for precise calculations. u nit the unit of the acceleration is change of step frequency per time unit divided by 256 . the scale of acceleration parameters ( a_max , a_actual , and a_threshold ) is defined by the parameter ramp_div (see sect ion 8.1.13 ) and depends on the clock frequency of the tmc429. 8.1.9 is_agtat , is_aleat , is_v0 , and a_threshold (idx=%1000) these parameters are only relevant in spi mode. the parameters is_agtat, is_aleat , is_v0 , and a_threshold represent the current scaling values i s . depending on the ramp phase they are applied to the motor by scaling the current amplitudes of the internal sequencer. the aut omatic motion dependent current scale feature of the tmc429 is provided primarily for microstep operation. it may also be applied for full step or half step drivers, if those provide current control bits. in this special case it is possible to initialize t he microstep table with a constant function, square function or sine wave using the two most significant dac bits. is_agtat the parameter is_agtat is applied if the acceleration is greater than the threshold acceleration. this is used to increase current during acceleration phases. is_aleat the parameter is_aleat is applied if the acceler ation is lower than or equal to the threshold acceleration. this is the nominal motor current. is_v0 the third parameter is_v0 is applied if the stepper motor is at rest. the parameter is used to save power, keep it cool, and avoid noise probably caused by chopper drivers. a_threshold the parameter a_threshold is the threshold used for comparing with the current acceleration in o rder to select the current scale factor.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 27 www.trinamic.com r elationship between is_agtat , is_aleat , and is_v0 and the interim bit vect or i_scale the parameters is_agtat , is_aleat , and is_v0 are bit vectors of three bit width. one of these bit vectors is selected conditionally and assigned to the interim bit vector i_scale . i_scale i s 0 0 0 1 = 100 % 0 0 1 1 / 8 = 12.5 % 0 1 0 2 / 8 = 25 % 0 1 1 3 / 8 = 37.5 % 1 0 0 4 / 8 = 50 % 1 0 1 5 / 8 = 62.5 % 1 1 0 6 / 8 = 75 % 1 1 1 7 / 8 = 87.5 % n ote - the maximum current scaling factor 1 is selected by i_scale = %000. this is the power - on default. - the minimum current scaling factor 1/8 = 0.125 is selected by i_scale = %001. - the current scaling factor i s proportionally reduces the effective number of microsteps per full step. for example, with i_scale = %100 (= 4/8 = 50%) the number of effective microsteps per full step is halved. - when a low current scaling factor i s becomes u sed, the effective number of microsteps per full step may decrease, because less dac steps are used to distinguish the same number of current levels. therefore, it is advised to operate the application normally at 50% to 100% current scale. the current sca le selection scheme shows which of the scale factors is_agtat , is_aleat , and is_v0 is selected corresponding to their conditions: if the velocity is zero, the parameter is_v0 is used for scaling. if the velocity is not zero, either is_aleat or is_agtat i s used for scaling. this depends on the absolute value of the acceleration and the acceleration threshold a_threshold . c urrent scale selecti on scheme velocity value a threshold value i s scale factor selection v= 0* 1) i s := is_v0 * 2) v 0 a threshold > 1023 i s := is_aleat * 3) | a | i s := is_aleat | a | > a threshold i s := is_agtat * 1) the configuration bit continuous_update of the stepper motor global parameter register must be set to 1 to make sure that the coil current is scaled for v=0 if all motors are at rest. the current scale for v=0 takes place delay ed to avoid mechanical step loss due to oscillations of the motor af ter it has been stopped. the delay time is: p _ 4 _ [ ] = 699 ( 76 6 _ ) [ ] * 2) for selection of current scaling is_v0 (at rest) is_agtat and is_aleat must be larger than 0. * 3) it is not advised to use a_threshold > 1023. due to comparing of a_threshold with a_max a setting of a_threshold with a value greater than 1023 results in using is_aleat if a_max is greater than 1023 during acceleration. for most applications setting is_aleat and is_agtat to the same value an d using a lower value for is_v0 is the best choice.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 28 www.trinamic.com 8.1.10 pmul & pdiv (idx=%1001) in ramp mode, the tmc429 uses an internal algorithm to calculate the deceleration ramp on the fly. this algorithm requires an additional proportionality factor p which allows the tmc429 to calculate the velocity required for stopping in time to exactly reach the target position without overshooting. this calculation is done for each ramp step. the result of this calculation can be read in the register v_target . wh enever v_target falls below the actual velocity, the tmc429 decelerates. as there is a large range of acceleration and velocity values, p is stored in a floating point representation, using the registers pmul (mantissa) and pdiv (exponent). using the propo rtionality factor p target positions are quickly reached without overshooting. the proportionality factor primarily depends on the acceleration limit a_max and on the two clock divider parameters pulse_div and ramp_div . these two separate clock divider par ameters (set to the same value for most applications) provide an extremely wide dynamic range for acceleration and velocity. pulse_div and ramp_div allow reaching very high velocities with very low acceleration. changing one parameter out of the triple { a_max , ramp_div , pulse_div } requires re - calculation of the parameter pair { pmul , pdiv } to update the associated register. 8.1.10.1 calculation of the proportionality factor p the representation of the proportionality factor p by the two parameters pmul and pdiv is a floating point representation. n otations registers are pmul and pdiv . operating values are p mul and p div . c alculate p as follows : ? = ? ??? ? ? ? ? with p mul = 128 255 representing a factor of 1.000 to 1.992 (=1+127/128) p div = {2 3 , 2 4 , 2 5 2 14 , 2 15 , 2 16 } p mul ranges from 128 to 255 . p div is a power of two with a range from 8 to 65536. values of p less than 128 can be achieved by increasing p div . the tmc429 does not directly store the p div parameter . the motion controller stores pdiv with ? ? ? ? = 2 3 + ???? n ote - setting the factor p too small will result in a slow approach to the target position. - setting the factor p too large will cause overshooting and even oscillations around the target position. - the parameters pmul and pdiv share the address idx=%1001. the msb of pmul is fixed set to 1 and cannot be changed . this way , pmul represents a m antissa in the range 1.000 (%1000 0000) to 1.992 (%1111 1111). v_max target position calculation velocity ramp generator (micro-) step pulses v_target x_target x_actual pdiv pmul a_max v_min pulse_div ramp_div clk32 clock_div32 clk v_actual puls generator figure 8 . 2 target position calculation, ramp generator, and pulse generator
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 29 www.trinamic.com 8.1.10.1.1 c alculation of p for a given acceleration p and the fitting pmul and pdiv values can be calculated by the microcontroller. optionally a pair of matching values of a_max , pmul and pdiv can be stored into the microcontroller memory. the acceleration limit is a stepper motor parameter which is fixed in most applications. if the acceleration limit has to be changed nevertheless, the microcontroller can calculate a pair of pmul and pdiv on demand for each new acceleration limit a_max with ramp_div and pulse_div . also, pre - calculated pairs of pmul and pdiv read from a table can be sufficient. 8.1.10.2 calculation of pmul and pdiv a pair of pmul and pdiv has to be calculated for each provided accelera tion limit a_max . note, that there may be more than one valid pair of pmul and pdiv for a given a_max acceleration limit. c onsiderations for th e calculation of pmul and pdiv - to accelerate, the ramp generator accumulates the acceleration value to the actual velocity with each time step. - the absolute value v_max of the velocity internally is represented by 11+8=19 bits, while only the most significant 11 bits and the sign are used as input for the step pulse generator. so, there are 2 11 =2048 values possible for specifying a velocity within a range of 0 to 2047. - the ramp generator accumulates 1/256* a_max with each time step to the actual velocity value v_actual during acceleration phases. this accumulation uses 8 bits for decimals. so, the acceleration from a velocity v_actual =0 to the maximum possible velocity v_max =2047 spans over 2048*256 / a_max pulse generator clock pulses. - within the acceleration phase the pulse generator generates s = ? * 2048* 256 / a_max * t steps for the ( micro) step unit. - the parameter t is the clock divider ratio: t = 2 ramp_div / 2 pulse_div = 2 ramp_div C pulse_div during the acceleration, the velocity has to be increased until the velocity limit v_max is reached or deceleration is required in order to exac tly reach the target position. the tmc429 automatically determines the deceleration position in ramp_mode and decelerates. this calculation uses the difference between current position and target position and the proportionality parameter p , which has to b e p = 2048 / s. the following formula results: ? = 2048 ? 1 2 ? 2048 ? 256 ? ?? ? ? ? 2 ? ?? ? _ ? ? ? ? ? ? ? ?? _ ? ? ? this can be simplified to ? = ? _ ?? ? 128 ? 2 ? ?? ? _ ? ? ? ? ? ? ? ?? _ ? ? ? h ints - to avoid overshooting, the parameter pmul should be made approximately 1% smaller than calculated. alternatively set p reduced by an amount of 1%. - if the proportionality parameter p is too small, the target position will be reached slower, because the slow down ramp starts earlier. the target po sition is approached with minimal velocity v_min , whenever the internally calculated target velocity becomes less than v_min . - with a good parameter p the minimal velocity v_min is reached a couple of steps before the target position. - with parameter p set a little bit too large and a small v_min overshooting of one step (respectively one microstep) may occur. a decrement of the parameter pmul avoids this one - step overshooting.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 30 www.trinamic.com ? v v_max v(t) v_min p too small p too large p good t 1 t 0 t 2 figure 8 . 3 proportionality parameter p and outline of velocity profile(s) 8.1.10.2.1 choosing a pair of pmul and pdiv the calculation is based on the formula l = 2 2 = 2/ 7. 2 7 > c alculations 1. to represent the parameter p choose a pair of pmul and pdiv which approximates p . 2. value range for pmul : 128 255 3. value range for pdiv : one out of {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} (representing p div one out of {8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32786, 65536}) 4. try all 128 * 14 = 1792 possible pairs of pmul and pdiv with a program and choose a matching pair. 5. to find a pair, calculate for each pair of pmul and pdiv l = _ 56< 6 _ 7 _ and l = = 6 / 6 and m = 6. select one of the pairs satisfying the condition 0.95 < q < 1.0. the value q interpreted as a function q (a_max, ramp_div, pulse_div, pmul, pdiv) gives the quality criterion required. although q = 1.0 indicates that the chosen p_mul and p_div perfectly represent the desired p factor for a given a_max , overshooting could result because of finite numerica l precision. on the other hand i n case of high resolution microstepping, overshooting of one microstep is negligible in most applications. to avoid overshooting, use p_mul - 1 instead of the selected p_mul or select a pair ( p_mul , p_div ) with q = 0.99 . 8.1.10.2.2 optimized calculation of pmul and pdiv the calculation of the parameters pmul and pdiv can be simplified using the expression 2/ 7. = 2 7 2 with l = _ 56< 6 _ 7 _ to avoid overshooting, use l = ( 1 [ % ] ) with p_reduction approximately 1% this results in : 2/ 7. = 2 7 2 = 0. 99 2 7 2 pmul becomes a function of the parameter pdiv . to find a valid pair { pmul , pdiv } choose one out of 14 pairs for pdiv = {0, 1, 2, 3, ..., 13} with pmul within the valid range 128 pmul 255. the c language example pmulpdiv.c can be found on www.trinamic.com . the source code can directly be copied from the pdf datasheet file.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 31 www.trinamic.com 8.1.10.2.3 calculation example: p mul and p div /* program example pmulpdiv.c : how to calculate p_mul & p_div for the tmc429 */ #include #include #include #include void calcpmulpdiv(int a_max, int ramp_div, int pulse_div, float p_reduction, int *p_mul, int *p_div, double *pideal, double *pbest, double *predu ) { int pdiv, pmul, pm, pd ; double p_ideal, p_best, p, p_reduced; pm=- 1; pd=- 1; // - 1 indicates : no valid pair found p_ideal = a_max / (pow(2, ramp_div- pulse_div)*128.0); p = a_max / ( 128.0 * pow(2, ramp_div- pulse_div) ); p_reduced = p * ( 1.0 C p_reduction ); for (pdiv=0; pdiv<=13; pdiv++) { pmul = (int)(p_reduced * 8.0 * pow(2, pdiv)) C 128; if ( (0 <= pmul) && (pmul <= 127) ) { pm = pmul + 128; pd = pdiv; } } *p_mul = pm; *p_div = pd; p_best = ((double)(pm)) / ((double)pow(2,pd+3)); *pideal = p_ideal; *pbest = p_best; *predu = p_reduced; } int main(int argc, char **argv) { int a_max=0, ramp_div=0, pulse_div=0, p_mul, p_div, a_max_lower_limit=0, a_max_upper_limit=0; double pideal, pbest, predu; float p_reduction=0.0; char **argp; if (argc>1) { while (argv++, argc--) { argp = argv + 1; if (*argp==null) break; if ( (!strcmp(*argv,- a)) ) sscanf(*argp,%d,&a_max); else if ( (!strcmp(*argv,- r)) ) sscanf(*argp,%d,&ramp_div); else if ( (!strcmp(*argv,- p)) ) sscanf(*argp,%d,&pulse_div); else if ( (!strcmp(*argv,- pr))) sscanf(*argp,%f,&p_reduction); } } else { fprintf(stderr,\ n usage : pmulpdiv C a - r - p - pr <0.00 .. 0.10>\ n example : pmulpdiv C a 10 C r 3 C p 3 C pr 0.05\ n); return 1; } printf(\ n \ n a_max=%d\ tramp_div=%d\ tpulse_div=%d\ tp_reduction=%f\ n \ n, a_max, ramp_div, pulse_div, p_reduction); calcpmulpdiv(a_max, ramp_div, pulse_div, p_reduction, &p_mul, &p_div, &pideal, &pbest, &predu ); printf( p_mul = %3.3d\ n p_div = %3d\ n \ n p_ideal = %f\ n p_best = %f\ n p_redu = %f\ n \ n, p_mul, p_div, pideal, pbest, predu); a_max_lower_limit = (int)pow(2,(ramp_div- pulse_div- 1)); printf(\ n a_max_lower_limit = %d,a_max_lower_limit); if (a_max < a_max_lower_limit) printf( [warning: a_max < a_max_lower_limit]); a_max_upper_limit = ((int)pow(2,(12+(ramp_div- pulse_div)))) - 1; printf(\ n a_max_upper_limit = %d,a_max_upper_limit); if (a_max > a_max_upper_limit) printf( [warning: a_max > a_max_upper_limit]); printf(\ n \ n); return 0; } /* -------------------------------------------------------------------------- */
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 32 www.trinamic.com 8.1.11 lp , ramp_mode , and ref_conf (idx=%1010) the configuration words ref_conf and ramp_mode ar e accessed via a common address . lp , ramp_mode , and ref_conf bit or register function ramp_mode the two bits ramp_mode ( r_m ) select one of the four possible stepping modes. lp the bit called lp (latched position) is a read only status bit. ref_conf the configuration bits ref_conf select the behavior of the reference switches. 8.1.11.1 ramp_mode register tmc429 motion modes ramp_mode bits mode function %00 ramp_mode default mode for positioning applications with trapezoidal ramp. this mode is provided as default mode for positioning tasks. %01 soft_mode similar to ramp_mode , but with soft target position approaching. the target position is approached with exponentially reduced velocity. this feature can be useful for applications where vibrations at the t arget position have to be minimized. %10 velocity_mode mode for velocity control applications, change of velocities with linear ramps. this mode is for applications, where stepper motors have to be driven precisely with constant velocity. %11 hold_mode the velocity is controlled by the microcontroller, motion parameter limits are ignored. this mode is provided for motion control applications, where the ramp generation is completely controlled by the microcontroller.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 33 www.trinamic.com 8.1.11.2 the ref_conf register and the lp r ead - only status bit a reference switch can be used as an automatic stop switch. the reference switch indicates the reference position within a given tolerance. the automatic stop function of the switches can be enabled or disabled. also a reference tolera nce range (see register dx_ref_tolerance, chapter 8.1.14 ) can be programmed to allow motion within the reference switch active range during homing. when a reference switch is triggered, the actual position can be stored automatically. this allows a precise determination of the reference point. it is initiated by writing a dummy value to the register x_latched (see chapter 8.1.15 ). the read - only status bit lp (latch position waiting) indicates that the next change of the selected reference switch will trigger latching the position x_actual . the lp bit is aut omatically reset after position latching. negative direction mechanical inaccuracy of switches ( switching hysteresis ) x 1 x 2 motor traveller left switch x left dx _ ref _ tolerance positive direction x 3 x 4 x right right switch x traveler figure 8 . 4 left switch and right switch for reference search and automatic stop function the bits contained in the ref_conf register control the semantic and the actions of the reference/stop switch modes for interrupt generation as explained later. the stepper motor stops if the reference/stop switch becomes active. this mechanism reacts only to the switch which corresponds t o the actual motion direction, e.g. the right switch when moving to a more positive position. the configuration bits named disable_stop_l respectively disable_stop_r disable these automatic stop functions. if the bit soft_stop is set, the motor stop s with linear ramp as determined by a_max . r eference switch conf iguration bits ref_conf and lp status bit ref_conf mnemonic function disable_stop_l 0 : the motor will be stopped when the velocity is negative ( v_actual < 0) and the left reference switch becomes active. 1 : left reference switch is disabled as an automatic stop switch. disable_stop_r 0 : stops a motor if the velocity is positive ( v_actual > 0) and the right reference switch becomes active. 1 : right reference switch is disabled as an automatic stop switch. soft_stop 0 : stopping takes place immediately; motion parameter limits are ignored. 1 : stopping takes place in consideration of motion parameter limits; stops with linear ramp. ref_rnl 0 : the bit ref_rnl ( reference switch right not left ) defines which switch will be used as the reference switch . the definition of the reference switch by the configuration bit ref_rnl has no effect on the stop function of the reference switches if disable_stop_l = 0 respectively disable_stop_r = 0. the left reference switch controls reference switch functions. 1 : the right (not left) reference switch controls reference switch functions. lp 0 : this is the power - on default of the lp (latched position waiting) bit. 1 : x_latched has been initialized by a write access to latch the position on a change of the reference switch. it is set to 0 after a position has been latched .
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 34 www.trinamic.com there is a functional difference between reference switches and stop switches. reference switches are used to determine a reference position for a stepper motor. stop switches are used for automatic stopping a motor when reaching a limit. the signals of sw itches are processed via the inputs ref1, ref2, ref3, refr1, refr2, and refr3. they might be used as automatic stop switches, reference switches, or both. 32 bit datagram sent from a c to the tmc429 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data 0 smda 1 0 1 0 lp ref_conf ramp_ mode latched position (waiting) ref_rnl soft_stop disable_stop_r disable_stop_l %00 ramp , %01 : soft , %10 : velocity , %11 hold tmc429 - i r eference switches (16 - pin package ) the tmc429 - i has three reference switch inputs ref1, ref2, ref3. switches can be used as reference switches and as automatic stop switches as well. per default, one reference switch input is assigned to each stepper motor as a left reference switch. the r eference switch input ref3 can alternatively be assigned as the right reference switch of stepper motor one. in this configuration a left and a right reference switch is assigned to stepper motor one, a left reference switch is assigned to stepper motor tw o, and no reference switch is assigned to stepper motor three. the bit named mot1r in the stepper motor global parameter register (rrs=1 & address=%111111) selects one of these configurations. with a 74hc157 as additional hardware, up to six reference swi tches C a left and a right one assigned to each stepper motor C are supported. concerning the 74hc157 three of four 2 - to - 1 - multiplexers are used. the multiplexing feature is controlled by the bit named refmux in the stepper motor global parameter register (rrs=1 & address=111111).
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 35 www.trinamic.com 8.1.12 interrupt_mask & interrupt_flags (idx=%1011 ) the tmc429 provides one interrupt register of eight flags for each stepper motor. interrupt bits are named int_ . the interrupt out nint_ sdo_c is set active low and the int errupt status bit int is set active high if at least one interrupt flag of one motor becomes set. if the interrupt status is inactive, nint is high (1) and int is low (0). s etting masks and fla gs - an interrupt flag is set to 1 if its assigned interrupt con dition occurs. - each interrupt bit can either be enabled or disabled (1/0) individually by an associated interrupt mask bit named mask_ . - interrupt flags are reset to 0 by a write access (rw=0) to their interrupt register address (idx=%1011). wri te 1 at the position of the bit to clear the flag. writing a 0 to the corresponding position leaves the interrupt flag untouched. - interrupt flags are forced to 0 if the corresponding mask bit is disabled (0). i nterrupt flags for e ach motor int_ function int_pos_end if a target position is reached while the interrupt mask mask_pos_end is 1, the bit is set to 1. int_ref_wrong reference switch signal was active outside the reference switch tolerance range (defined by the dx_ref_tolerance register). the switches processed via the inputs ref1, ref2, ref3, refr1, refr2, and refr3 can be used as stop switches for automatic motion limiting, as reference switches, and for both. if a reference switch becomes active out of the ref erence switch tolerance range the interrupt flag int_ref_wrong is set if the interrupt mask bit mask_ref_wrong is set. int_ref_miss the interrupt flag int_ref_miss is set if the reference switch is inactive at the 0 position and the mask mask_ref_miss is enabled. int_stop the int_stop flag is set, if the reference switch has forced a stop during motion and if the interrupt mask mask_stop is set. int_stop_left_low high to low transition of left reference switch. the int_stop_left_low flag is set if the reference switch changes from high to low and if the interrupt mask bit mask_stop_left_low is set. int_stop_right_low high to low transition of right reference switch. the int_stop_right_low flag is set if the reference switch changes from high to low an d if the interrupt mask bit mask_stop_right_low is set. int_stop_left_high low to high transition of left reference switch. the int_stop_left_high flag indicates that the left reference switch input changes from low to high if the mask bit mask_stop_left_high is set. int_stop_right_high low to high transition of right reference switch. the int_stop_right_high flag indicates that the right reference switch input changes from low to high if the mask bit mask_stop_right_high is set. i nterr upt mask bit for eac h motor mask_ function mask_pos_end 1: mask enabled; 0: mask disabled. mask_ref_wrong 1: mask enabled; 0: mask disabled. mask_ref_miss 1: mask enabled; 0: mask disabled. mask_stop 1: mask enabled; 0: mask disabled. mask_stop_left_low 1: mask enabled; 0: mask disabled. mask_stop_right_low 1: mask enabled; 0: mask disabled. mask_stop_left_high 1: mask enabled; 0: mask disabled. mask_stop_right_high 1: mask enabled; 0: mask disabled.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 36 www.trinamic.com 32 bit datagram sent from a c to the tmc429 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data 0 smda 1 0 1 1 interrupt_mask interrupt_flags mask_stop_right_high mask_stop_left_high mask_stop_right_low mask_stop_left_low mask_stop mask_ref_miss mask_ref_wrong mask_pos_end int _stop_right_high int _stop_left_high int _stop_right_low int _stop_left_low int _stop int_ref_miss int_ref_wrong int_pos_end the interrupt status is mapped to the most significant bit (31) of each datagram sent back to the c and it is only available at the nint_ sdo_c pin of the tmc429 if the pin nscs_c is high. de- multiplexing of the multiplexed interrupt status signal at the pin nint_ sdo_c can be done using additional hardware. it is not necessary if the microcontroller always disables its interrupt while it sends a datagram to the tmc429. 8.1.13 pulse_div & ramp_div & usrs (idx=%1100) the frequency of the external clock signal (pin clk) is divided by 32 (see figure 8 . 2 ). this clock drives two programmable clock dividers: ramp_div for the ramp generator and pulse_div for the pulse generator. ramp_div and pulse_div allow a division of 1/32 f clk by the following value settings: value 0 1 2 3 4 5 6 7 8 9 10 11 12 13 division by 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 pulse_div the pulse generator clock C defining the maximum step pulse rate C is determined by the parameter pulse_div . the parameter pulse_div scales the velocity parameters. ramp_div the parameter ramp_div scales the acceleration parameter a_max. usrs the parameter usrs (step resolution selection) is used for setting the microstep frequency in spi mode. in step/dir mode the external driver controls the number of microsteps and usrs has no significance. 8.1.13.1 calculating the step pulse rate r ? [ ?? ] = ? ?? ? [ ?? ] ? ?????? ? ? 2 ? ? ? ?? _ ? ?? ? 2048 ? 32 where f clk [hz] is the frequency of the external clock signal. velocity is in range 0 to 2047 and represents parameters v_min , v_max , and absolute values of v_target and v_actual . the pulse generator of the tmc429 generates one step pulse with each 1/(32*2^ pulse_div ) clock pulse with a given theoretical velocity setting of 2048. [attention: range 2047]
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 37 www.trinamic.com the full step frequency r fs in step/dir mode is given by ? ?? [ ?? ] = ? [ ?? ] # ? ?? ? ?????? ?? ?? ??? ?? ? ? ????? the full step frequency r fs in spi mode is given by ? ?? [ ?? ] = ? [ ?? ] 2 ???? the change r in the pulse rate per time unit is given by ? ? [ ?? / ? ] = ? ?? ? [ ?? ] ? ? ?? ? [ ?? ] ? ? _ ?? ? 2 ? ? ? ?? _ ? ? ? + ? ?? ? _ ? ?? + 29 where r: pulse frequency change per second (acceleration) 29: the constant is derived form 2 29 = 2 5 * 2 5 * 2 8 * 2 11 = 32*32*256*2048. 32 comes from fixed clock pre - dividers, 256 comes from the velocity accumulation clock pre - divider, and 2048 comes from the velocity accumulation clock divider programmed by a_max . the parameter a_max is in range 0 to 2047. the change of fullstep frequency r fs in the pulse rate per time unit in step/dir mode is given by ? ?? [ ?? ] = ? [ ?? ] # ? ?? ? ?????? ?? ?? ??? ?? ? ? ????? the change of fullstep frequency r fs in the pulse rate per time unit in spi mode is given by ? ?? [ ?? ] = ? [ ?? ] 2 ???? the angular velocity of a stepper motor can be calculated based on the full step frequency r fs [hz] for a given number of full steps per rotation. similar ly , the angular acceleration of a stepper motor can be calculated based on the change of the full step frequency per second r fs [hz]. 8.1.13.2 calculating the number of steps during linear acceleration ? = 1 2 ? ? 2 ? where s = number of steps a = linear acceleration v = velocity with v = r [hz] and a = r [hz/s] one gets: ? = 1 2 ? ? 2 ? ?? ? ? 2 ? ?? ? _ ? ? ? 2 ? ? ? ?? _ ? ? ? 2 3 the number of full steps s fs in step/dir mode during linear acceleration is given by ? ?? = ? # ? ?? ? ?????? ?? ?? ??? ?? ? ? ????? the number of full steps s fs in spi mode during linear acceleration is given by ? ?? = ? 2 ? ?? ? changing pulse_div in velocity_mode or in hold_mode might force an internal microstep (with microstep resolution defined by usrs ) depending on the actual microstep position. this behavior can be observed especially when the motor is at re st. in ramp_mode this does not occur. pulse_div should only be changed in ramp_mode !
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 38 www.trinamic.com 8.1.13.3 choosing the microstep resolution in spi mode the three bit wide parameter usrs determine the microstep resolution for an associated stepper motor. there is an individual set of 6 dac bits provided for each of the two phases (coils) of each motor. these two six bit values control the spi driver coil currents. with 6 bit dac resolutio n, the tmc429 can provide up to 64 microsteps per full step. with 4 bits , fewer positions can be determined, but still an improvement can be experienced when choosing more than 16 microsteps resolution. depending on the microstep resolution, a subset of t he 6 dac bits is significant. the motors also can be operated in fullstep. for fullstepping, the current amplitude is constant for both phases of a stepper motor and the polarity of one phase changes with each full step. the microstep counters are initiali zed to 0 during power - on reset. with each microstep an associated counter accumulates the programmed microstep resolution value usrs . m icrostep resolution selection ( usrs ) parameter usrs [microsteps / full step] significant dac bits (controlling current amplitude) comment 0 0 0 1 - full step (constant current amplitude) 0 0 1 2 5 (msb) half step 0 1 0 4 5 (msb), 4 microstepping 0 1 1 8 5 (msb), 4, 3 1 0 0 16 5 (msb), 4, 3, 2 1 0 1 32 5 (msb), 4, 3, 2, 1 1 1 0 64 5 (msb), 4, 3, 2, 1, 0 (lsb) 1 1 1 8.1.14 dx_ref_tolerance (idx=%1101) generally, the switch inputs ref1, ref2, ref3, refr1, refr2, and refr3 can be used as stop switches for automatic motion limiting and as reference switches defining a reference position for the stepper motor. to allow the motor to drive near the reference point, it is possible to exclude a motion range of steps from the stop switch function. the parameter dx_ref_tolerance disables automatic stopping by a switch around the origin (see figure 8 . 4 ). to use the dx_ref_tolerance far from the origin, the actual position has to be adapted, e.g. by setting it to zero in the center of the tolerance range. additionally, the parameter dx_ref_tolerance affects interrupt conditions as described before (se ction 8.1.12 ). 8.1.15 x_latched (idx=%1110) this read - only register stores the actual position x_actual upon a change of the reference switch state. the reference switch is defined by the bit ref_rnl of the configuration register 8.2.4.5 . writing a dummy value to the (read - only) register x_latched initializes the position storage mechanism. the actual position is saved with the next rising edge or falling edge signal of the reference switch depending on the actual motion direction of the stepper motor. the actual position is latched when the switch defined as the reference switch by the ref_rnl bit changes (see chapter 1.5.4 ). the status bit lp signals, if latching of a position is pending. this way, a precis e reference is available for homing. an event at the reference switch associated to the actual motion direction takes effect only during motion (when v_actual 0). 8.1.16 ustep_count_429 (idx=%1111) the read only register ustep_count_429 holds the actual micro step pointer. this register is intended for applications where the motion controller part is completely switched off for power saving and the motor needs to be initialized to the same position after re - switching power on. reading the ustep_count_429 all ows reading the actual sequencer position of the internal sequencer. this is useful to support a system power down of an spi driver based system without position loss: store the position counter and the microstep counter ustep_count_429 before power down. after power up, set actual and target position to a value equal to the stored target position minus the stored microstep counter. then, move to the stored target position. the target position and electrical position now match the values before power down. afterwards, you can enable the stepper motor driver.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 39 www.trinamic.com 8.2 global parameter registers the registers addressed by rrs=0 with smda=%11 are global common parameter registers. to emphasize this difference, the address label jdx is used as index name instead of idx (see overview in chapter 7.3 ). o verview global parameter reg ister m apping r egister d escription datagram_low_word datagram_high_word the registers are used to store datagrams sent back from the stepper motor driver chain. cdgw the status bit signals an updat e of datagram_low_word and datagram_high_word . cover_datagram the tmc429 provides for direct ly sending datagrams from the microcontroller to the stepper motor drivers. a datagram can be transferred to the stepper motor driver by partially covering one datagram sent to the driver chain. cover_pos cover_len the parameter cover_pos defines the position of the first datagram bit to be covered by the cover_datagram (jdx=%0011) . the number of bits to be covered is defined by cover_len . if_configuration_429 this register is used for configuration of - the reference switch inputs - the de - multiplexed interrupt output - the step/dir interface - the association of the position compare output signal to one stepper motor stepper motor global parameter register this register holds different configuration bits for the stepper motor driver chain and defines - polarities and chip select signal (spi) - timing (spi mode / step/dir mode) - number of stepper motor drivers in the chain (spi) - updates (spi) - multiplexing reference switch inputs (tmc429 - i and tmc429 - pi24) - reference switch adustments tc2 - i
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 40 www.trinamic.com 8.2.1 datagram_low_word (jdx=%0000) & datagram_high_word (jdx=%0001) the tmc429 stores datagrams sent back from the stepper motor driver chain with a total length of up to 48 bits. the two registers datagram_low_word and datagram_high_word form a 48 bit shift register in which datagram_low_word holds the lower 24 bits and datagram_high_word holds the higher 24 bits. the data from the pin sdi_s is shifted left into the register with each datagram bit sent to the stepper motor driver chain via the signal sdo_s. a write to one of these read - only registers initializes them, to update their contents with the next datagram received from the driver chain . 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 last tmc246 driver of the chain (stepper motor #1) ld2 ld1 ld0 1 ot otpw uv ochs olb ola ocb oca datagram_high_word datagram_low_word 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 first tmc246 driver of the chain (stepper motor #3) second tmc246 driver of the chain (stepper motor #2) ld2 ld1 ld0 1 ot otpw uv ochs olb ola ocb oca ld2 ld1 ld0 1 ot otpw uv ochs olb ola ocb oca sdi_s figure 8 . 5 example of status bit mapping for a chain of three tmc246 or tmc249 8.2.1.1 functionality of the cdgw status bit the cdgw (= cover datagram waiting ; see section 8.2.3 ) status bit is set to 1 until a datagram is received from the stepper motor driver chain. in order to read out the datagram_low_word and the datagram_high_word the cdgw status bit is needed to detect a complete datagram transfer after an initial write to one of the two registers. the fact that the cdgw is formed by a logical or between the cover datagram status and the status of the datagram_lo w_word and datagram_high_word does not cause any restriction concerning its usage. this is because a write to the cover_datagram register forces sending a datagram which results in an update of the datagram_low_word and datagram_high_word registers. if t he cover_datagram mechanism is not used, the cdgw status bit is exclusively available as status signal of datagram_low_word and datagram_high_word .
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 41 www.trinamic.com 8.2.2 cover_pos & cover_len (jdx=%0010) the tmc429 allows for directly sending datagrams to the stepper motor d rivers. this is important for initialization purpose when using drivers which require a configuration prior to operation, like the tmc262 in spi mode. also during operation, datagrams may be required to change the driver mode of operation. a datagram with up to 24 bits can be transferred to the stepper motor driver by covering one datagram sent to the driver chain. the parameter cover_pos defines the position of the first datagram bit to be covered by the cover_datagram (jdx=%0011) of length cover_len . in c ontrast to the datagram numbering order of bits, the position count for the cover datagram starts with 0. the cover_datagram bits indexed from cover_len - 1 to 0 cover the datagram sent to the driver chain. a step bit used to control stepper motor drivers must not be covered while a motor is running! the reason is that the coverage of a step bit causes losing the associated step if the step bit is active. w rite access versus r ead access the tmc429 stores cover_pos +1 instead of cover_pos due to internal requirements. so, one writes cover_pos but reads back cover_pos +1. the cw (= cover waiting ) bit is available by read out of this register and indicates that the cover datagram has not been sent yet. cdgw versus cw the cdgw status bit (see section 8.2.3 ) is the result of a logical or between cw and an internal signal that indicates the status of the stepper motor serial driver chain se nd register. 8.2.3 cover_datagram (jdx=%0011) the tmc429 provides direct sending of datagrams from the microcontroller to the stepper motor drivers. a datagram can be transferred to the stepper motor driver by covering one datagram sent to the driver chain. the register cover_datagram holds up to 24 bit. a cover datagram covers the next datagram sent to the stepper motor driver chain. if no datagrams are sent to the driver chain, the cover datagram is sent immediately after writing it into the cover_datagram reg ister. 0 1 2 3 4 5 6 7 8 9 10 11 12 34 35 36 37 38 6 5 4 3 2 1 0 47 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 msb 5 4 3 2 1 0 lsb length = 7: cover_len = 7 up to 24 cover_datagram bits 39 40 41 42 43 45 46 datagram bits #39 to #46 covered by cover_datagram bits #6 to #0 position=39: cover_pos = 39 cover datagram bits #6 to #0 cover the 7 datagram bits #39 to #46 48 datagram bits send to the stepper motor driver chain msb of the cover datagram (here bit #6) is sent first. figure 8 . 6 cover datagram example with 7 bits covering 7 bits of a 48 bit datagram the cdgw status bit has to be checked to be sure that no cover datagram is waiting to be processed. after that, a new cover datagram can be written into the cover_datagram register. the cdgw bit is set to 1 until the cover_datagram is sent. the cdgw status bit is also used as status bit for the datagram_low_word and datagram_high_word (see section 0 ).
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 42 www.trinamic.com 8.2.4 if_configuration_429 (jdx=%0100) the register if_configuration_429 is the interface configuration register for the tmc429. it is used for configuration of - the additional reference inputs, - the de - multiplexed interrupt output, - the step/dir interface, and - the association of the position compare output signal to one steppe r motor. i nterface configurati on register control bits if_configuration_429 function inv_ref invert common polarity for all reference switches. if this bit is set, a low level on the input signals an active reference switch. sdo_int map internal non - multiplexed interrupt status to nint_sdo_c (needs sdoz_c as sdo_c for read back information from the tmc429 to the microcontroller). with sdo_int=1 the nint_sdo_c is a non - multiplexed nint output to the microcontroller step_half toggle on each step pu lse (this halfs the step frequency, both pulse edges represent steps). step_half reduces the required step pulse bandwidth and is useful if for low - bandwidth optocouplers. this function can be used for the tmc262 stepper driver. inv_stp invert step pulse polarity. this configuration can be used for adaption of the step polarity to external d r iver stages. inv_dir invert dir si g n al polarity. this is for adaption to external d r iver stages. alternatively, this can be used as a shaft bit to adjust the direction of motion for a motor, but do not use this as a direction bit because it has no effect on the internal handling of signs ( x_actual, v_actual ) . en_sd enable step/dir. this bit switches the driver to step/dir mode. if this flag is 0, it operates in spi mode. note: the step pulse timing (length) must be compatible with both, the desired step frequency and the external drivers requirements. the step pulse timing is determined by the 4 lsbs of clk2_div when step/dir mode is selected by en_sd=1. select one motor out of three motors for the position compare function output of the tmc429 named poscmp. %00 motor 1 %01 motor 2 %10 motor 3 en_refr enable tmc429 reference inputs refr1, refr2, refr3. as a default, the right reference inputs are disabled (en_refr=0). 32 bit datagram sent from a c to the tmc429 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data 0 smda 0 1 0 0 if_configuration_429 en_refr pos_comp_sel_1 pos_comp_sel_0 en_sd inv_dir inv_stp step_half sdo_int inv_ref
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 43 www.trinamic.com n ote - afte r power - on, the tmc429 is in spi mode. the output signals are logic high until they become configured for step/direction mode. - open inputs refr1, refr2, and refr3 in step/dir mode have active state if refmux=0 due to their internal pull - up resistors. if en _refr=0 these additional reference switch inputs are ignored. - refmux does not work in step/dir mode because the spi signal nscs_s is not available. the output is signal s2 (step2) in step/dir mode - do not enable unused refr1, refr2, refr3 inputs of the tm c429 as stop switches if these inputs are open! 8.2.4.1 pos_comp_429 (jdx=%0101) pos_comp_429 defines a position, which becomes compared to the selected motor position (select via pos_comp_sel ). whenever the positions match, the pos_comp output becomes active. 8.2.4.2 po s_comp_int_429 (jdx=%0110) the position compare interrupt mask ( m ) and interrupt flag ( i ) register hold the mask and interrupt concerning the position compare function of the tmc429. 8.2.4.3 power_down (jdx=%1000) a write to the register address power_down sets the tmc429 into the power down mode until it detects a falling edge at the pin nscs_c . during power down, all internal clocks are stopped. all outputs remain stable, and all register contents are preserved. 8.2.4.4 type_and_version_429 (jdx=%1001) read only register that gives type und version of the design. for the tmc429 version 1.01 it reads 0x429101. 8.2.4.5 reference_ switches l3, r3, l2, r2, l1, and r1 (jdx=%1110) the current state of the reference switches can be read out with this register. the tmc4 29- li, tmc429 - pi24, and the tmc429 - i require different settings of related bits and registers before a read - out of the reference switch bits is possible. o verview : reasonable settings for different packa ges refmux mot1r en_refr tmc429 - i tmc429 - pi24 tmc4 29- li 1l 1r 2l 2r 3l 3r 1l 1r 2l 2r 3l 3r 1l 1r 2l 2r 3l 3r 0 0 0 x - x - x - x - x - x - x - x - x - 0 0 1 dont use x x x x x * 1 x x x x x x 0 1 0 x x x - - - dont use dont use 1 0 0 x x x x x x x x x x x x dont use * 1 always reads as high level (internal pull - ups) if it is desired to invert the polarity of the reference switches, the bit inv_ref of the if_configuration_429 register can be set. this allows matching normally open contacts or normally closed contacts. tmc429 - li to enable right reference switch inputs ( refr1, refr2 and refr3) and the associated status bits r1 , r2 , and r3 for the right switches set en_refr of the register if_configuration_429 to 1 (refer to chapter 0 ). with the default value en_refr =0 the right reference inputs refr1, refr2, and refr3 are disabled and shown as inactive . tmc429 - pi24 to enable right reference switch inputs (refr1, refr2) and the associated status bits r1 and r2 for the right switches set en_refr of the register if_configuration_429 to 1 (refer to chapter 0 ). with the default value en_refr =0 the right reference inputs ref r1 and refr2 are disabled and shown as inactive. if a right reference switch for the third motor is needed and spi motor drivers are used, the refmux bit of the stepper motor global parameter control can be set to 1 (refer to chapter 0 ).
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 44 www.trinamic.com note: the refmux bit is only used for multiplexing reference switch inputs by using a 74hc157 multiplexer. related to the tmc429 - pi24 this is only required for getting a third right reference switch input. the bit continuous_update of the stepper motor global parameter register (jdx=%1111) is important for reading out the reference switches if the external multiplexer is used. tmc429 - i with the default value 0 of the bit en_refr (see if_configuration_429 , chapter 8.2.4 ) all three right reference switch inputs of the tmc429 - i are inactive, because the inputs are not available on the package. there are different possibilities for configuration and multiplexing of the three reference switch inputs. in cha pter 8.2.4.5 they are explained in detail. if all six reference switches are used in an spi stepper motor driver chain (via an external 74hc157 multiplexer ), these inputs are de - multiplexed internally by the tmc429 - i. the states of the switches can be read out from the reference_ switches read - only register. the bit continuous_update of the stepper motor global parameter register (jdx=%1111) is important for reading out the reference switches if spi drivers and the external multiplexer are used.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 45 www.trinamic.com 8.2.5 stepper motor global parameter register (jdx=%1111) this register holds different configuration bits for the stepper motor driver chain. the absolute address (rrs & address) of the stepper motor global parameter register is %01111110 = $7e. please note that these registers and bits are mainly for spi mode. in step/dir mode refmux and mot1r can be used for the switch configuration (tmc429 - i) and the four lsbs [30] of the clk2_div register (named stpdiv_429 in step/dir mode ) are used for timing. please refer to chapter 10 for the calculation of step/dir timing. o verview of stepper m otor global paramete r control register interface function polarities spi this five bit register defines polarities and chip select signals for the stepper motor driver chain. cs_comind spi this bit is used to define either if a single chip select signal nscs_s is used in common for all stepper motor driver chips or if three chip select signals nscs_s, nscs2, nscs3 are used to select stepper motor driver chips individually. clk2_div spi and step/dir spi mode: the ei ght bits named clk2_div determine the clock frequency of the stepper motor driver chain clock signal sck_s. step/dir mode: the timing of the step/dir interface is controlled by the four lsbs [30] of the clk2_div register. the clk2_div [30] is named stpdiv _429 . please refer to chapter 10 for the calculation of step/dir timing. lsmd spi for datagram configuration in spi mode the number of stepper motor drivers is important. it is represented by the 2 bit parameter lsmd ( last stepper motor driver ). continuous_update spi setting thi s bit can be set if a continuous update of the datagrams to the motor driver chain is necessary and an external multiplexer is used. the continuous update is carried out during periods of rest ( velocity =0), too. this bit is required for the automatic curre nt control during rest periods when using spi drivers. refmux spi refmux is used for multiplexing the reference switch inputs of the tmc429_i (by using a 74hc157 multiplexer). if a right reference switch for the third motor is needed refmux can be used for the tmc429 - pi24, too. mot1r spi and step/dir this bit is only used with the tmc429 - i (16 - pin package). t hree available reference switches can be adjusted . refer to chapter 9.1 (including figure 9 . 2 and figure 9 . 3 for further information ) . 32 bit datagram sent from a c to the tmc429 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data 0 1 1 1 1 1 1 clk2_div polarities lsmd mot1r refmux continuous_update cscommonindividual polarity_dac_ab polarity_fd polarity_ph_ab polarity_sck_s polarity_nscs_s last stepper motor driver
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 46 www.trinamic.com 8.2.5.1 polarities the global parameter register polarities is only used with spi motor drivers and defines all polarities necessary. p olarities - global parameter r egister polarities (6 bits) function polarity_nscs_s controls the polarity of the selection signal nscs_s for the stepper motor driver chain . 0 the nscs_s signal is low active . 1 the nscs_s signal it is high active . polarity_sck_s defines the polarity of the stepper motor driver chain clock signal sck_s. 0 t he clock polarity is according to figure 11 . 1 . 1 the clock signal sck_s is inverted. polarity_ph_ab defines the polarity of the phase bits for the stepper motor. 0 normal polarity. 1 polarity inverted. polarity_fd defines the polarity of the fast decay controlling bit. 0 f ast decay is high active . 1 f ast decay is low active. polarity_dac_ab defines the polarity of the dac bit vectors. 0 t he dac bits are high active (normal polarity). 1 t he dac bits are inverted (low active). 8.2.5.2 cscommonindividual cs c ommon i ndividual - global parameter r egister cscomind defines either if a single chip select signal nscs_s is used in common for all stepper motor driver chips (e.g. for tmc236, tmc239, tmc246, tmc249) or if three chip select signals nscs_s, nscs2, nscs3 are used to select the stepper motor driver chips indiv idually. this feature is useful only for the tmc429 within the larger packages, where the two additional chip select signals (nscs2, nscs3) are available. the common chip select signal nscs_s is used if cscommonindividual =0. the polarity control bit for the nscs_s signal must be set to polarity_nscs_s =0 if cscommonindividual =1. the chip select polarity is always negative for three individual chips select signals. 8.2.5.3 clk2_div the eight clk2_div bits determine the clock frequency of the motor driver chain in spi mode. (for information about timing in step/dir mode refer to chapter 10.) u nit the range of c lk2_div is {7, 8, 9, 253, 254, 255}. - the default value after power - on reset is clk2_div = 15. - a value of 7 (%00000111, $07) is the lower limit for the clock divider parameter. with clk2_div = 7 the clock frequency of sck_s is at maximum. this value is b est for the trinamic drivers tmc236 / tmc239 / tmc246 / tmc249. - the frequency f sck_s [hz] of sck_s does not become higher for clk2_div < 7, but the signal sck_s becomes asymmetric with respect to its duty cycle. an asymmetric duty cycle may cause instable spi transmission to stepper drivers, because the timing might become too fast. - a value of 255 (%11111111, $ff) is the upper limit for the parameter clk2_div. with clk2_div = 255 the clock frequency of sck_s is at minimum. which level of variations of step frequencies is acceptable depends on the application. at high microstep resolutions the step rate can be a multiple of the spi rate without impact on the motor smoothness.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 47 www.trinamic.com c lock f requency f sck_s [hz] the frequency f sck_s [hz] of the stepper motor driver chain clock signal sck_s is given by ? ??? _ ? = ? ?? ? 2 ? ( ? ?? 2 _ ? ?? + 1) - for smooth motion even at high step frequencies the clock frequency f sck_s [hz] should be set as high as possible by choosing the parameter clk2_div in consideration of the data clock frequency limit defined by the slowest stepper motor driver chip of the daisy chain. - if step frequencies reach the order of magnitude of the maximum datagram frequency (determined by the clock frequency of sck_s and by the datagram length) the step frequencies may jitter, which is an inherent property of spi communication. up to which level variations of step frequencies are acceptable depends on the application. for most applications, a setting of clk2_div = 7 is recommended. d atagram f requency f datagram [hz] the datagram frequency f datagram [hz] is given by ? ? ??? ? ??? = ? ??? _ ? [ ?? ] 1 + ? ? ? ?? ??? _ ? ?? ??? [ ? ?? ] + 1 this formula is an approximation for the upper limit. - for clk2_div = 7 the processing of the nxm bit ( next motor bit ) requires 1 spi clock cycle. - the processing of the nxm bit requires 1.5 spi clock cycles for clk2_div > 7. as result for a chain of three drivers with 12 bit datagram length each, the upper limit of the datagram frequency is ? ? ??? ? ??? [ hz ] = ? ?? k _ s [ ?? ] 1 + 3 ? ( 12 + 1 ) + 1 = ? ?? k _ s [ ?? ] 41 8.2.5.4 l sm d - last stepper motor driver for the datagram configuration in spi mode the number of stepper motor drivers is important. it is represented by the parameter lsmd ( last stepper motor d river). s etting the number of stepper motor drive rs lsmd number motor drivers %00 (=0) 1 motor driver %01 (=1) 2 motor drivers %10 (=2) 3 motors drivers %11 (=3) not allowed!
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 48 www.trinamic.com 8.2.5.5 continuous_update the tmc429 in spi mode sends datagrams to the stepper motor driver chain only on demand. the continuous_update bit offers two possibilities. continuous _ update s ettings continuous _update description 0 no datagrams are sent during rest periods if continuous_update is set to 0. this reduces communication traffic. the multiplexed reference switch inputs are only processed while datagrams are sent to the stepper motor driver chain. a stepper motor (stopped at reference switch / switch became inactive ) stays at rest until a new datagram is sent from the tmc429 to the stepper motor driver chain. afterwards, the stepper motor can be either moved into the direction opposite to the reference switch or it can be moved in both directions by disabling the aut omatic stop function. there is no automatic coil current scaling if the motors are at rest! this setting is recommended for low power applications, e.g. if the stepper motor drivers shall be put into standby mode. 1 when using a reference switch multipl exer, with the reference switches configured to stop associated stepper motors automatically, the configuration bit continuous_update must be set to 1. this forces the periodic sending of datagrams to the stepper motor driver chain and samples the referenc e switches periodically, if all stepper motors are at rest. with this, a stepper motor restarts if the associated reference switch becomes inactive. for automatic coil current scaling this bit must be set to 1. the coil current is scaled even though all m otors are at rest ( velocity =0). refer to chapter 8.1.9 . this is the normal setting enabling all features. the continuous update datagram freuency is given by ? ?? ? ? _ ? [ hz ] = ? ?? ? [ hz ] ? ( 1 2 ramp _ div _ 0 + 1 2 ramp _ div _ 1 + 1 2 ramp _ div _ 2 ) 32768 where ramp_div_0, ramp_div_1, and ramp_div_2 are the ramp_div settings of the three stepper motors.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 49 www.trinamic.com 9 reference switch inputs 9.1 reference switch configuration, mot1r, and refmux mot1r is useful for single or dual motor applications with the tmc429 - i. it can be used in spi mode and in step/dir mode. in a configuration with spi drivers and external reference multiplexer ( refmux =1) all reference switches are available even with tmc429 - i. this configuration may also be useful with the tmc429 - pi24. without multiplexing the tmc429 - pi24 offers three left switches but only two right switches. a ssociation of refere nce inputs depending on configuration bi ts refmux tmc429 - i and tmc429 - pi 24 spi only mot1r spi only motor 1 motor 2 motor 3 left switch right switch left switch right switch left switch right switch 0 0 ref1 % ref2 % ref3 % 0 1 ref1 ref3 ref2 % % % 1 0 ref1_left ref1_right ref2_left ref2_right ref3_left ref3_right 1 1 ref1_left ref1_right ref2_left ref2_right ref3_left ref3_right n otes - with refmux set to 0, the association of the reference switch inputs ref1, ref2, and ref3 depend on the setting of mot1r . - if reference switch multiplexing is enabled, mot1r is ignored. - power - on default values are refmux =0 and mot1r =0. - after power - on - reset, the default setting ( refmux =0 and mot1r =0 ) select s the basic single reference switch configuration as outlined in figure 9.2 . tmc429 - li and tmc4 29 - pi24 the tmc429 - li offers two reference switches (right and left) for each stepper motor. therefore the tmc429 - li does not need to be configured with refmux and mot1r . the tmc429 - pi24 offers one left reference switch for each motor and a right reference switch for motor 1 and motor 2. refmux may be used with the tmc429 - pi24 in spi mode if a right reference switch for motor 3 is needed. mot1r has no relevance for the tmc4 29- pi24. sck _ s sdo _ s sdi _ s nscs _ s ref 2 r ref 3 ref 1 r test gnd clk v 5 v 33 sck _ c sdi _ c nscs _ c sdoz _ c nint _ sdo _ c ref 1 ref 3 r ref 2 sck _ s sdo _ s sdi _ s nscs _ s ref 2 r ref 3 ref 1 r test gnd clk v 5 v 33 sck _ c sdi _ c nscs _ c sdoz _ c nint _ sdo _ c ref 1 ref 2 tmc429-li tmc429-pi24 figure 9 . 1 tmc429 - li has three right reference inputs. tmc429 - pi24 has two right reference inputs.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 50 www.trinamic.com tmc429 - i the tmc429 - i offers three reference switch inputs, which can be used left - side - only or two - one - zero as shown in figure 9.2 and in figure 9.3 . mot1r is used to set the reference switch configuration ( left - side - only resp. two - one - zero ). refmux is used for the configuration of multiplexing the three reference switches (e.g. with 74hc 157 multiplexer). l eft - side - only the power - on default value of mot1r is 0. with this default value, ref1 is associated to the left reference switch of stepper motor #1, ref2 is associated to the left reference switch of stepper motor #2, and ref3 is assoc iated to the left reference switch of stepper motor #3. r e f _ s w 3 _ l e f t r e f _ s w 2 _ l e f t r e f _ s w 1 _ l e f t sck _ s sdo _ s sdi _ s nscs _ s ref2 ref3 ref1 test gnd sdi _ c nscs _ c sck _ c sdo _ c clk v 5 v 33 tmc 429 - i + vcc + vcc + vcc figure 9 . 2 reference switch configuration left - side - only for mot1r =0 (and refmux =0) t wo - one - zero if mot1r is set to 1 the input ref1 is also associated with the left reference switch of stepper motor #1. ref2 is also associated to the left reference switch of stepper motor #2. but, the input ref3 is associated to the right reference switch of stepper motor #1 and no reference switch input is associated to stepper motor number#3 (see figure 9.3 ) + vcc + vcc + vcc no reference switch for stepper motor 3. n 3 n n 33 TMC429-I r e f _ s w 2 _ l e f t r e f _ s w 1 _ right r e f _ s w 1 _ l e f t figure 9 . 3 reference switch configuration two - one - zero for mot1r =1 (and refmux =0)
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 51 www.trinamic.com m ultiplexing ( spi driver mode , only ) the refmux bit must be set to 1 to enable reference switch multiplexing (see figure 9 . 4 ). for the two variants tmc429 - pi24 and tmc429 - li, the reference switch multiplexing also works for cscommonindividual=1 using three separate driver selection signals (nscs_s, nscs2, nscs3) if the signal nscs_s is connected to the multiplexer 74hc157 accor ding to figure 9 . 7 . if continuous_update is 1, internal reference switch bits are updated periodically, even if all stepper motors are at rest. additionally, the chip select signal nscs_s for the stepper motor driver chain is also the control signal for a multiplexer in case of using the referenc e switch multiplexing option (see figure 9 . 4 ). so, the continuous_update must be set to 1 if automatic stop by reference switches is enabled, if six multiplexed refer ence switches are used, and to get the states of reference switches while all stepper motors are at rest. a 1 a 0 a < mux b c d b 1 b 0 c 1 c 0 d 1 d 0 sel 1 / / 0 / en ref 1 _ left ref 1 _ right ref 2 _ left ref 2 _ right ref 3 _ left ref 3 _ right + vcc 74 hc 157 sck _ s sdo _ s sdi _ s nscs _ s ref2 ref3 ref1 test gnd sdi _ c nscs _ c sck _ c sdo _ c clk v 5 v 33 TMC429-I figure 9 . 4 reference switch multiplexing with 74hc157 (refmux=1) 9.2 triple switch configuration the programmable tolerance range around the reference switch position is useful for a triple switch configuration, as outlined in figure 9.5 . in this configuration two switches are used as automatic stop switches and one additional switch is used as the reference switch between the left stop switch and the right stop switch. the left stop switch and the reference switch are c onnected in series. in order to use the reference switch, program a tolerance range into the register dx_ref_tolerance. this disables the automatic stop within the tolerance range of the reference switch. the homing procedure can use the right switch to ma ke sure, that the reference switch is found properly. the tmc429 can automatically check the correct position of the driver whenever the reference switch is passed. negative direction x ' 1 x' 2 left stop switch x' left x 1 x 2 reference switch x 0 positive direction x 3 x 4 x right right stop switch dx_ref_tolerance motor traveller x traveler figure 9 . 5 triple switch configuration left stop switch C reference switch C right stop switch
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 52 www.trinamic.com 9.3 homing procedure in order to home the drive, the reference switch position x ref must be determined after each power on (see figure 9.6 ). p roceed as follows : 1. due to mechanical inaccuracy of switches, the reference switch is active within the following range: x 1 < x ref < x 2 , where x 1 and x 2 may vary. if the traveler is within the range x 1 < x traveler < x 2 at the start of the homing procedure, it is necessary to leave this range, because the associated reference switch is active. a dummy write access to x_latched initializes the position latc h register. 2. with the traveler within the range x 2 < x traveler < x max and the register x_latched initialized, the position x 2 can simply be determined by motion with a target position x_target set to C x max . 3. when reaching position x 2 the position is latche d automatically. 4. with stop switch enabled, the stepper motor automatically stops if the position x 2 is reached. 5. now, set the dx_ref_tolerance in order to allow motion within the active reference switch range x 1 < x ref < x 2 and to move the traveler to a p osition x traveler < x 1 if desired. 6. afterwards initialize the register x_latched again to latch the position x 1 by a motion to a target position x traveler < x 1 . 7. when the positions x 1 and x 2 are determined the reference position x ref = (x 1 + x 2 ) / 2 can b e set. finally, one should move to the target position x_target = x ref and set x_target := 0 and x_actual := 0 when reached. mechanical inaccuracy of switches ( switching hysteresis) x 1 x 2 reference switch dx 2 dx 1 dx_ref _tolerance x ref x max motor traveller x traveler negative direction positive direction figure 9 . 6 reference search 9.4 simultaneous start of up to three stepper motors starting stepper motors s imultaneously can be ach i eved by sending successive datagrams starting the stepper motors. if the delay between those datagrams is of the magnitude of some microseconds, the stepper motors can be considered as started simultaneously. feeding the reference switch signals through or gates (see figure 9 . 7 ) allows exact simultaneous start of the stepper motors under software control. a1 a0 a < mux b c d b1 b0 c1 c0 d1 d0 sel1/ /0 /en ref1_left ref1_right ref2_left ref2_right ref3_left ref3_right +vcc 74hc157 74hc32 hold hold sck _ s sdo _ s sdi _ s nscs _ s ref2 ref3 ref1 test gnd sdi _ c nscs _ c sck _ c sdo _ c clk v 5 v 33 TMC429-I sck _ s sdo _ s sdi _ s nscs _ s ref 2 r ref 3 ref 1 r test gnd clk v 5 v 33 sck _ c sdi _ c nscs _ c sdoz _ c nint _ sdo _ c ref 1 ref 3 r ref 2 tmc429-li figure 9 . 7 reference switch gateing for exact simultanous stepper motor start
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 53 www.trinamic.com 10 step/dir drivers step/dir drivers contain an internal sequencer. the step/dir interface is a simple and universal interface for real time motion control. the internal sequencer of the tmc429 and its associated ram table is not used for step/dir drivers. all additional control functions like current control have to be provided by the microcontro ller directly communicating to the driver. the step/dir mode is enabled if the control bit en_sd (enable step/dir) of the if_configuration_429 register is set to 1. 10.1 timing the timing of the step/dir interface should be adapted to the requirements of the driver and the transmission line. the minimum pulse width may be limited. the timing of the step/dir interface is controlled by the four lsbs [30] of the clk2_div of the global parameter register. here, the clk2_div [30] is named stpdiv_429 . for a given clock frequency f clk [mhz] of the tmc429, the length t step [s] of a step pulse is ? ???? [ ?? ] = 16 ? 1 + ?????? _ 429 ? ?? ? [ ??? ] - for a clock frequency f clk [mhz] of 16mhz the step pulse length can be programmed in integer multiple of 1s by stpdiv_429 . - the stpdiv_429 has to be set compatible to the upper step frequency f step = 1/t step which is used. - the first step pulse after a change of direction is delayed by t dir2stp which is equal to t step to avoid setup time violations of the step/dir power stage. m aximum step frequenc ies generally, the maximum step pulse frequency is f step_max [mhz] = f clk [mhz] / 32. for a clock frequency f clk [mhz] = 16 mhz the maximum step pulse frequency f step_max is 500khz. for a clock frequency f clk [mhz] = 32 mhz the maximum step pulse frequency f step_max is 1mhz. stp dir t step t dir2stp = t step t step t dir2stp = t step figure 10. 1 step/dir timing ( en_sd = 1; step_half = 0)
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 54 www.trinamic.com 11 spi mode driver interface the tmc429 contains a microstep sequencer, which directly connects to spi stepper motor drivers. the internal sequencer provides the full set of control signals for three stepper motor driver ics. the spi datagram is individually configurable for each stepper motor d river chip of the daisy chain . this is necessary, because there is no standard for the sequence, the meaning , and the number of the control bits for serial stepper motor drivers. the stepper motor driver datagram configuration adapts the specific sequence of control bits required by the driver ic. it is stored within the first 32 addresses representing 64 values of the on - chip ram (see chapter 10 ). the tmc429 is simply configurable by sending a fixed sequence of datagrams to initialize it after power - up. once initialized, the tmc429 autonomously generates the datagrams for the stepper motor driver daisy chain without any additional interventions of the microco ntroller. to operate the tmc429 in spi mode set en_sd to 0 (see chapter 0 ). the address ing of the stepper motor drivers within a daisy chain is determined by their position in the spi chain: the last ic in the chain is motor driver 0. for trinamic drivers, configuration data is provided. 11.1 bus signals signal description tmc429 stepper driver bus clock input sck_s serial data input sdi_s serial data output sdo_s chip select input nscs_s 11.2 timing the timing of the serial stepper motor interface is similar to that of the microcontroller interface. clk t clk sck _ s nscs _ s sdi _ s sdo _ s sdi _ s _ bit # 0 t pd t pd t pd 1 x sampled sdi _ s t suscsdrv t hdscsdrv t cksl t cksh sdo _ s _ bit # 0 sdi _ s _ bit#n-1 sdo_s_bit#n-1 sdo_s_bit#1 sdi_s_bit#1 sdo_s_bit#n sdi_s_bit#n m datagram bits one full stepper motor driver datagram t datagramdrv 1 x sampled sdi_s m x sampled sdi_s figure 11. 1 timing diagram of the se rial stepper motor driver interface e xplanatory notes - the clock divider provides 16 up to 512 clock cycles (tclk) for a serial driver interface data clock period. - the default duration of a clock period (tsckcl+tsckch) of the signal nscs_s is 16+16=32 cloc k periods of the clock signal clk. - the minimal duration of a serial interface clock period (tsckcl+tsckch) is 8+8=16 clock cycles of signal clk. set clk_div =7. this setting provides best performance in most cases. - the polarities of the signals nscs_s and sck_s are programmable to use driver chips with inverted polarities without additional glue logic. - the input sdi_s of the serial driver interface must always be driven to a defined level. to avoid high impedance (z ) at this input pin while the stepper motor driver chain is idle, a pull - up resistor or a pull - down resistor of 10 k ? is required at the input.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 55 www.trinamic.com t iming characteristic s of serial stepper motor driver interfa ce symbol parameter min typ max unit t suscsdrv 8 16 256 clk periods t hdscsdrv 8 16 256 clk periods t cksl 8 16 256 clk periods t cksh 8 16 256 clk periods t damagramdrv datagram length 8+8+1*16+8+8=48 512+64*512+512= 33792 clk periods t damagramdrv datagram duration for 1 - 64 bits @ fclk = 16 mhz 3 2112 s t damagramdrv datagram duration for 1 C 64 bits @ fclk = 32 mhz 3 1056 s t pd clk - rising - edge to outputs delay 5 ns 11.3 ram address partitioning and data organization the spi datagram for each stepper motor driver is composed of internal sequencer output signals provided by the microstep unit of the tmc429 individually for each stepper motor. each internal sequencer output signal is represented by a five bit code word called driver configuration code . the order of internal sequencer output signals forming the spi datagrams for the stepper motor driver daisy chain is defined by the order of driver configuration code words in the configuration ram area. the on - chip ram capacity is 128 x 6 bit. the 128 on - chip ram cells of 6 bit width are addr essed via 64 addresses with 2 x 6 data words . from the addressing point of view, the address space enfolds 64 addresses of 12 bit wide data. the 64 addresses are partitioned into two ranges of 32 addresses C selected by the register ram select rrs bit. th e registers of the tmc429 are addressed with rrs =0. the on - chip ram is addressed with rrs =1. p artitioning of the o n - chip ram address space 32 bit datagram sent from a c to the tmc429 via pin sdi_c 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data data odd ram addresses data even ram addresses 1 0 32 x (2x6 bit) driver chain datagram configuration range nxm_1 signal_codes nxm_0 signal_codes 1 1 32 x (2x6 bit) quarter period sine wave lut range quarter sine wave values (amplitude) quarter sine wave values (amplitude) d river chain data con figuration the sequencer internally generates a number of control signals available for transmission to spi driver ics. these sequencer output signals are selected as configured by the internal s tepper motor driv er datagram configuration table. the first 32 addresse s are provided for the configuration of the serial stepper motor driver chain. each of these 32 addresses stores two configuration words, composed of the so called nxm (next motor) bit together with the 5 bit wide driver configuration code . while sending a datagram, the driver
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 56 www.trinamic.com configuration code words are read sequentially beginning with the first address of the driver chain datagram configuration memory range. each driver configuration code word selects a signal provided by the microstep unit. m icrostep t able the second 32 addresses are provid ed to store the microstep table. this table usually is a quarter period of a sine wave or of a periodic function , which has been optimized for a given motor type. different stepper motors may step with different microstep resolutions, but the microstep look up table (lut) is the same for all stepper motors controlled by one tmc429. any quarter wave period stored in the microstep table is expande d automatically to a full period wave together with its 90 phase shifted wave. n x m the nxm bit tells the tmc429 that the last bit of a motor driver spi register is reached. the tmc429 increments the internal stepper motor addressing counter and switches to the next driver in the chain after reading an spi configuration word with nxm =1. if the internal stepper motor addressing counter is equivalent to the last stepper motor driver lsmd parameter, the datagram transmission is finished and the counter is pr eset to %00 for the next datagram transmission to the stepper motor driver chain. the total data word width is six bit: five for a n internal sequencer output signals and one nxm bit.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 57 www.trinamic.com 11.4 stepper driver spi datagram configuration a number of control signals are required to drive 2 - phase stepper motors. the serial driver interface forms the link between the tmc429 and the stepper motor driver chain. the motor driver datagram configuration defines the order of the control signals serially sent from tmc429 to t he stepper motor driver chain. to define the serial order of the control signals, driver configuration code s have to be written into the stepper motor driver datagram configuration area of the on - chip configuration ram of the tmc429. the control signals required in a given application depend on the stepping mode (full step, half step, or microstep) and on additi onal options related to the stepper motor driver chips used. the tmc429 primarily provides a full set of control signals individually for each of the up to three stepper motors respectively stepper motor driver chips of the daisy chain. mnemonics for drive r configuration code s are given in the table below. the names of these signals may differ to the signal names of the used stepper motor drivers. s tepper motor driver datagram configurati on mnemonic d river configuration code function hex bin dac_a_0 $00 %00000 dac a, bit 0 ( lsb ) coil a dac_a_1 $01 %00001 dac a, bit 1 dac_a_2 $02 %00010 dac a, bit 2 dac_a_3 $03 00011 dac a, bit 3 dac_a_4 $04 00100 dac a, bit 4 dac_a_5 $05 00101 dac a, bit 5 ( msb ) ph_a $06 00110 phase polarity bit a fd_a $07 %00111 fast decay bit a dac_b_0 $08 01000 dac b, bit 0 ( lsb ) coil b dac_b_1 $09 %01001 dac b, bit 1 dac_b_2 $0a 01010 dac b, bit 2 dac_b_3 $0b %01011 dac b, bit 3 dac_b_4 $0c 01100 dac b, bit 4 dac_b_5 $0d 01101 dac b, bit 5 ( msb ) ph_b $0e 01110 phase polarity bit b fd_b $0f 01111 fast decay bit b zero $10 10000 constant 0 one $11 10001 constant 1 direction $12 %10010 0 : up / 1 : down resp. counter clockwise / clockwise step $13 10011 step bit for step/dir control of drivers unused (these codes might be used for future devices) $14 %10100 $15 %10101 $16 %10110 $17 %10111 $18 %11000 $19 %11001 $1a %11010 $1b %11011 $1c %11100 $1d %11101 $1e %11110 $1f %11111 f or each coil of each motor the following function bits are provided : - 6 bit control signals for the dac (current control), - 1 bit for the phase polarity, and - 1 bit for fast decay (only for stepper motor driver chips which offer fast decay).
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 58 www.trinamic.com f or both co ils of each motor fu rther function bits are provided : - 1 constant configuration bit named zero , - 1 constant configuration bit named one , - 1 direction bit for step/dir control of drivers, and - 1 step bit for step/dir control of drivers. figure 11. 2 outlines how to connect the control signals of the tmc429 with the signals used to control the digital part of a stepper motor driver. serial driver interface zero one dac_a_0 dac_a_1 ... ph_a fd_a dac_b_ 0 dac_b_1 ... ph_b fd_b direction step 3 x micro stepping unit (incl. sequencer) tmc429 multiple ported ram serial -to- parallel interface (s) ca3 pha mda stepper motor driver control logic stepper motor driver (chain) e.g. tmc236 / tmc239 / tmc246 / tmc249 msb lsb ca2 ca1 ca0 cb3 phb mdb cb2 cb1 cb0 status signals dac_a_5 ph_a fd_a dac_a_4 dac_a_3 dac_a_2 dac_b_5 ph_b fd_b dac_b_4 dac_b_3 dac_b2 ca3 pha mda ca2 ca1 ca0 cb3 phb mdb cb2 cb1 cb0 n status signals control signals status signals n figure 11. 2 serially transmitted control and status signals between tmc429 and driver chain if fullstep operation of an spi stepper motor is desired, e.g. at higher velocities, the driver configuration codes for the dac bits can be replaced by constant 1 bits (signal code %11) on the fly during high velocity motion. this way, the microstep resolution does not need to be changed. u nderstanding the con figurable spi datagram sequencer 1. the tmc429 sends datagrams to the stepper motor driver chain only on demand. to guarantee the integrity of each datagram, the status of all internal sequencer output signal s is buffered internally before sending. 2. afterwards, the transmission starts with s election of the buffered internal sequencer output signal s of the first motor ( smda =%00) by reading the first driver configuration code word (even data word at on - chip ram address %00000) from on - chip configuration ram area. 3. the driver configuration code s select the sequencer output signals provided for the first stepper motor. the first stepper motor is addressed until the nxm (next motor) bit is read from on - chip configuration ram. the stepper motor driver address is incremented with each nxm =1 as long as the current stepper motor driver address is below the value set by the parameter lsmd (last stepper motor driver). if the stepper motor driver address is equivalent to the lsmd parameter, nxm =1 indicates the completion of the transmission. 4. now, the ste pper motor driver address counter of the serial interface is reinitialized to %00 and the unit waits for the next transmission request. note - the order of driver configuration code s in the on - chip ram configuration area determines the order of datagram bit s for the stepper motor driver chain, whereas the prefixed nxm bit determines the stepper motor driver positions. if no nxm bit with a value of 1 is stored within the on - chip ram, the tmc429 will send endlessly. - the on - chip ram has to be configured first! - after power - on reset, the registers of the tmc429 are initialized in a way that no transmission of datagrams to the motor driver chain is required. - access to on - chip ram is always possible, also during transmission of datagrams to the driver chain.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 59 www.trinamic.com 11.4.1 initialization of on - chip ram by c after power - on after the automatic power - on reset all registers are initialized and all stepper motors are at rest. the on - chip ram of the tmc429 is initialized with a default configuration for a tmc23 x or tm24 x stepper motor driver chain. writing to tmc429 registers may cause action of the stepper motor units (initiated by the tmc429) which results in sending datagrams to the stepper motor driver chain! before moving a motor using other stepper motor drivers than tmc236 /tmc239/tmc246/tmc249 in an spi chain the on - chip ram must be initialized.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 60 www.trinamic.com 11.4.2 example for spi motor driver datagram configuration the following example demonstrates how to configure the datagram and shows what has to be stored within the on - chip ram to re present the desired configuration. the given example refers to a driver chain of three trinamic stepper motor drivers of type tmc236, tmc239, tmc246, or tmc249. from the tmc429 datagram configuration point of view, there is no difference between these driv ers. all drivers have a serial interface of 12 bits length. e xample configuration : - for the first and the second stepper motor driver of the chain the fast decay control bit (fd_a, fd_b) is fixed to 0. this setting can be beneficial in stand still. - for th e third driver the fast decay control bit is used. this sample gives smoothest microstepping. - the sequence to be sent to the tmc429 for this configuration is outlined in the table below. in power - on default, fast decay fixed on is shown. this will result in best microstep precision and smoothest operation. d atagram example and ram contents for three stepper motor driver chain power - on default initialization values of the tmc429 are marked as {one}. position within datagram driver nxm tmc429 signal cod e ram address ram data {por} tmc429 mnemonic {por default} tmc23x tmc24x bit name 0 driver#1 ( smda =%00) 0 $10 $00 $10 {$11} zero {one} mda 1 0 $05 $01 $05 dac_a_5 mdb 7 0 $0d $07 $0d dac_b_5 1 $0e $0b $2e ph_b 12 driver#2 (smda=%01) 0 $10 $0c $10 {$11} zero {one} mda 13 0 $05 $0d $05 dac_a_5 1 $0e $17 $2e ph_b 24 driver#3 ( smda =%10) 0 $07 $18 $07 {$11} fd_a {one} $06 ph_a 1 $0e $23 $2e ph_b lsmd = %10 the (third) nxm bit at address $ 23 (position 35) finishes the datagram transmission
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 61 www.trinamic.com the stepper motor driver datagram configuration can be accessed at any time without conflict, e.g. to change between a configuration using fast decay versus a configuration where fast decay is disabled. c onfiguration datagra m sequence for the e xample wi th C = dont cares binary datagram specification : hexadecimal datagram %10000000----------000101C010000 : $80000510 %10000010----------000011C000100 : $82000304 %10000100----------000110C000010 : $84000602 %10000110----------001101C010000 : $86000d10 %10001000----------001011C001100 : $88000b0c %10001010----------101110C001010 : $8a002e0a %10001100----------000101C010000 : $8c000510 %10001110----------000011C000100 : $8e000304 %10010000----------000110C000010 : $90000602 %10010010----------001101C010000 : $92000d10 %10010100----------001011C001100 : $94000b0c %10010110----------101110C001010 : $96002e0a %10011000----------000101C000111 : $98000507 %10011010----------000011C000100 : $9a000304 %10011100----------000110C000010 : $9c000602 %10011110----------001101C001111 : $9e000d0f %10100000----------001011C001100 : $a0000b0c %10100010----------101110C001010 : $a2002e0a 11.4.3 initialization of spi motor d river s u sing cover datagrams some stepper drivers require an initialization. when they are driven in spi - mode by a tmc429 there is no direct access from the c to stepper motor drivers. the tmc429 supports tunneling of data from the c to each stepper motor driver in the chain. this m echanism is called cover datagram . also, status information from the drivers may need to be fed back to the c for special functions. this is enabled by a set of two registers: datagram - low - word and datagram - high - word buffer data sent back from the drivers . p rocedure : - the tmc429 enables direct communication between the microcontroller and the stepper motor driver chain by sending a cover datagram . - the position cover_position and actual length cover_len of a cover datagram is specified by writing them into a common register. - writing an up to 24 bit wide cover datagram to the register cover_datagram will fade in that cover datagram into the next datagram sent to the stepper motor driver chain.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 62 www.trinamic.com 11.5 initialization of microstep look - up table for an spi driver chain the tmc429 provides a look - up table (lut) of 64 values of 6 bit for microstepping. the microstep lut can be adapted by storing an arbitrary quarter period of a periodic function to match individual stepper motor characteristics. it is common to use a sine wave function for microstepping. with that, the current of one phase is driven with the sine function whereas the other phase is driven with the cosine function. to initialize the lut for microstepping, load a quarter sine wave per iod into the microstep lut. each two successive values of the sine wave function are combined in one datagram similar to the driver configuration code words for the stepper motor driver chain configuration. the tmc429 automatically expands the quarter sine wave period to a full sine and cosine function. the necessary data values y(i) to represent a quarter sine wave period for the microstep lut are defi ned by ? ( ? ) = ??? ? 1 2 + 64 ? sin ? 1 4 ? 2 ? ? i 64 ? ? with i = { 0, 1, 2, 3, 60, 61, 62, 63 } where the conditional replacement y(i) := 63 for y(i) > 63 has to be done. the last five values (which are calculated to be 64) have to be replaced by 63. with this replaceme nt one finally gets y(i) = { 0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 16, 17, 19, 20, 22, 23, 24, 26, 27, 29, 30, 32, 33, 34, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 59, 60, 60, 61, 61, 62, 62, 62, 63, 63, 63 , 63 , 63 , 63 , 63, 63 }. the power - on reset default initialization of the tmc429 sine wave lut is with offset for tmc236/tmc239/tmc246/tmc249 with mixed decay control = one (on). step/dir control: tmc260/tmc261/tmc262 have their own optimized build - in sin e wave look - up table. s cheme of ? sine wave period wi th 6 bit resolution and 64 (32 x 2) values 32 bit datagram sent from a c to the tmc429 via pin sdi_c 3 1 3 0 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 9 1 8 1 7 1 6 1 5 1 4 1 3 1 2 1 1 1 0 9 8 7 6 5 4 3 2 1 0 rrs address rw data (x) 10 data @ odd ram addresses (x) 10 data @ even ram addresses 1 1 0 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 5 0 0 0 1 0 1 3 0 0 0 0 1 1 0 0 0 1 0 8 0 0 1 0 0 0 6 0 0 0 1 1 0 0 0 0 1 1 11 0 0 1 0 1 1 9 0 0 1 0 0 1 0 0 1 0 0 14 0 0 1 1 1 0 12 0 0 1 1 0 0 1 1 0 1 1 62 1 1 1 1 1 0 62 1 1 1 1 1 0 1 1 1 0 0 63 1 1 1 1 1 1 63 1 1 1 1 1 1 1 1 1 0 1 63 1 1 1 1 1 1 63 1 1 1 1 1 1 1 1 1 1 0 63 1 1 1 1 1 1 63 1 1 1 1 1 1 1 1 1 1 1 63 1 1 1 1 1 1 63 1 1 1 1 1 1 these 64 values represent a quarter sine period in the interval 0 s /4] which is expanded automatically by the tmc429 to a full sine cosine period (see section 11.5.1 ).
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 63 www.trinamic.com the table is sent to the on - chip ram of the tmc429 by 32 datagrams: % binary representation of the datagram : decimal represented pair of values (separated by & character) : $ hexadecimal representation % 11 00000 0 00000000 00 000010 00 000000 : 2 & 0 : $c0000200 % 11 00001 0 00000000 00 000101 00 000011 : 5 & 3 : $c2000503 % 11 00010 0 00000000 00 001000 00 000110 : 8 & 6 : $c4000806 % 11 00011 0 00000000 00 001011 00 001001 : 11 & 9 : $c6000b09 % 11 00100 0 00000000 00 001110 00 001100 : 14 & 12 : $c8000e0c % 11 00101 0 00000000 00 010001 00 010000 : 17 & 16 : $ca001110 % 11 00110 0 00000000 00 010100 00 010011 : 20 & 19 : $cc001413 % 11 00111 0 00000000 00 010111 00 010110 : 23 & 22 : $ce001716 % 11 01000 0 00000000 00 011010 00 011000 : 26 & 24 : $d0001a18 % 11 01001 0 00000000 00 011101 00 011011 : 29 & 27 : $d2001d1b % 11 01010 0 00000000 00 10 0000 00 011110 : 32 & 30 : $d400201e % 11 01011 0 00000000 00 100010 00 100001 : 34 & 33 : $d6002221 % 11 01100 0 00000000 00 100101 00 100100 : 37 & 36 : $d8002524 % 11 01101 0 00000000 00 100111 00 100110 : 39 & 38 : $da002726 % 11 01110 0 00000000 00 101010 00 101001 : 42 & 41 : $dc002a29 % 11 01111 0 00000000 00 101100 00 101011 : 44 & 43 : $de002c2b % 11 10000 0 00000000 00 101110 00 101101 : 46 & 45 : $e0002e2d % 11 10001 0 00000000 00 110000 00 101111 : 48 & 47 : $e200302f % 11 10010 0 00000000 00 110010 00 110001 : 50 & 49 : $e4003231 % 11 10011 0 00000000 00 110100 00 110011 : 52 & 51 : $e6003433 % 11 10100 0 00000000 00 110110 00 110101 : 54 & 53 : $e8003635 % 11 10101 0 00000000 00 111000 00 110111 : 56 & 55 : $ea003837 % 11 10110 0 00000000 00 111001 00 111000 : 57 & 56 : $ec003938 % 11 10111 0 00000000 00 111011 00 111010 : 59 & 58 : $ee003b3a % 11 11000 0 00000000 00 111100 00 111011 : 60 & 59 : $f0003c3b % 11 11001 0 00000000 00 111101 00 111100 : 61 & 60 : $f2003d3c % 11 11010 0 00000000 00 111110 00 111101 : 62 & 61 : $f4003e3d % 11 11011 0 00000000 00 111110 00 111110 : 62 & 62 : $f6003e3e % 11 11100 0 00000000 00 111111 00 111111 : 63 & 63 : $f8003f3f % 11 11101 0 00000000 00 111111 00 111111 : 63 & 63 : $fa003f3f % 11 11110 0 00000000 00 111111 00 111111 : 63 & 63 : $fc003f3f % 11 11111 0 00000000 00 111111 00 111111 : 63 & 63 : $fe003f3f n ote - these 32 datagrams for initialization of a quarter sine wave period microstep look - up table are sufficient for all programmable microstep resolutions. - if microstepping is used for at least one stepper motor, these 32 datagrams have to be sent once to the tmc429 for initializati on of the microstep table after power - on reset. - the initialization of the microstep look - up table is not necessary, if full stepping is used for all stepper motors. - a complete initialization of the microstep look - up table is recommended to avoid trouble caused by missing look - up table entries . - a fully initialized microstep look - up table allows the selection of individual microstep resolutions for different stepper motors. f urther formulas for sine wave look - up tables a sine wave table tailored to the m otor gives the best fit with respect to equidistance of microsteps or concerning torque ripple. alternatively, a sine wave look - up table based on the following formula can be used: ? ( ? ) = ??? ? 63 ? sin ? 1 4 ? 2 ? ? i 64 ? ? even, adding some offset o within theoretical range from 0 to 63 might enhance the microstep behavior together with mixed decay: ? ( ? ) = ??? ? ? + ( 63 ? ? ) ? sin ? 1 4 ? 2 ? ? i 64 ? ? finally, a sine wave look - up table has to be tested within the application and might need some fine adjustments for optimization.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 64 www.trinamic.com 11.5.1 stepping through the wave look - up table (lut) the 64 values of the wave look - up table (lut) hold a quarter period of a sine wave, indexed from 0 to 63. this quarter sine wave is expanded to a full sine wave and full cosine wave by indexing the 64 values of the lut. the lut index is mapped from a wave index of a full period from 0 to 255. the stepping through the lut is done with fixed increment width. the increment width is a power of two and i t depends on the microstep resolution selection usrs . for motion in positive direction, the full period index is incremented from microstep to microstep. for motion in negative direction, the full period index is decremented from microstep to microstep. th e sine is associated to phase a ( ph_a ) and the cosine is associated to phase b ( ph_b ). the phase bits represent the sign of the sine resp. cosine function. the polarity of the phase bit ( ph_a , ph_b ) and the polarity of the fast decay control bits ( fd_a , fd _b ) can be changed by the polarity bits within the global stepper motor parameter register (see section 0 , page 45 ). phase bits and fast decay control bits msbs of full wave index (range) quadrant ph_a sin ph_b cos fd_a sin fd_b cos %00 (0...63) 1 st 1 1 0 1 %01 (64...127) 2 nd 1 0 1 0 %10 (128...191) 3 rd 0 0 0 1 %11 (192...255) 4 th 0 1 1 0 n ote - always initialize the whole lut to be sure to read valid wave values and use the msb dac bits (no matter what microstep resolution is set). - the addressing starts with 0 after power - on reset. - changing the microstep resolution after some microsteps causes an offset for the addressing which has to be taken into account for positioning a stepper motor. - with lower microstep resolutions, a slightly different motor behavior may be experienced for le ft and right rotation. this is, because the tmc236 drivers treat zero current differently depending on the polarity. w ave lut indices for differe nt step resolutions usrs increment width 1 st quadrant 2 nd quadrant 3 rd quadrant 4 th quadrant %110 1 sin 0, 1, 2, 3, , 61, 62, 63, 63 , 63, 62, 61, , 3 2 1 1 2 3 1 2 3 3 3 2 1 3 2 1 cos 63 , 63, 62, 61, , 2, 1, 0, 1, 2, 3, , 61, 62, 63, 63 , 63, 62, 61, ,3, 2, 1, 0, 1, 2, 3, , 61, 62, 63 %101 2 sin 0, 2, 4, 6, , 58, 60, 62, 63 , 60, 58, 56, , 4, 2, 0, 2, 4, 6, , 58, 60, 62, 63 , 60, 58, 56, , 4, 2 cos 63 , 60, 58, 56, , 4, 2, 0, 2, 4, 6, , 58, 60, 62, 63 , 60, 58, 56, , 4, 2, 0, 2, 4, 6, , 58, 60, 62 %100 4 sin 0, 4, 8, 12, , 56, 60, 63 , 60, 56, , 12, 8, 4, 0, 4, 8, 12, , 56, 60, 63, 60, 56, , 12, 8, 4 cos 63 , 60, 56, , 12, 8, 4, 0, 4, 8, 12, , 56, 60, 63, 60, 56, , 12, 8, 4, 0, 4, 8, 12, , 56, 60 %011 8 sin 0, 8, 16, 24, , 48, 56 63 , 56, 48, 40, ,16, 8, 0, 8, 16, 24, , 48, 56 63 , 56, 48, 40, , 16, 8 cos 63 , 56, 48, 40, , 16, 8, 0, 8, 16, 24, , 48, 56 63 , 56, 48, 40, , 16, 8, 0, 8, 16, 24, , 48, 56 %010 16 sin 0, 16, 32, 48, 63 , 48, 32, 16, 0, 16, 32, 48, 63 , 48, 32, 16 cos 63 , 48, 32, 16, 0, 16, 32, 48, 63 , 48, 32, 16, 0, 16, 32, 48 %001 (hs) 32 sin 0, 32, 63 , 32, 0, 32, 63 , 32 cos 63 , 32, 0, 32, 63 , 32 0, 32 %000 (fs) 64 sin 0, 63 , 0, 63 cos 63 , 0, 63 0 11.5.2 partial look - up table initialization if all stepper motors (except those driven in full step mode) are programmed to use the same microstep resolution constantly before a single microstep is processed, a partially initialized microstep table can be sufficient. with a partially initialized lut , the microstep resolution must be chosen before any step is made after power - on res et. a partially initialized lut should only be taken into account, if the memory of the host microcontroller is not big enough to store a full table . instead of a partial initialization of the tmc429 look - up table an initialization with a triangular func tion ? ? ? ?? ? ( ? ) is recommended.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 65 www.trinamic.com 11.5.3 microstep enhancement even for stepper motors optimized for sine - cosine control, it is possible to improve the microstep behavior by adapting the microstep look - up table. for different types of stepper motors a periodic trapezoidal or triangular function (similar to a sine function) as superposition or replacement might be a good choice. taking the physics of stepper motors into account, the choice of the function can be determined by a single shape parameter . the programmability of the microstep look - up table provides a simple and effective facility to enhance microstepping for a given type of two - phase stepper motor. enhanced microstepping requires accurate current control. so, stepper motor driver chips with enabled and well tuned fast decay (resp. mixed decay) have to be used, e.g. trinamics tmc236 / tmc239 / tmc246 / tmc249 driver chips. non - linearity (resulting from magnetic field configuration determined by shapes of pole shoes), ferromagnetic characteri stics, and other stepper motor characteristics affect non - linearity in microstep behavior of stepper motors. the non - linearity of microstepping causes microstep positioning displacements, vibrations and noise, which can be reduced with an adapted microstep table. the best fitting microstep table can be determined by measuring the microstep motor behavior, e.g. using a laser pointer based on the sine - cosine microstepping table. nevertheless sine - cosine microstepping is a good first order approach for microstepping. the micro step enhancement possible with the tmc429 is based on a replacement of the look - up table initialization function sin( m ) used for sine - cosine microstepping by a function with the shape parameter . a quarter sine wave period is the basic approach for initialization of the microstep look - up table. a quarter of a trapezoidal function or a quarter of a triangular function is chosen depending on the shape paramet er for a given stepper motor type: b ( ) = _ ( ) for > 0 ( ) for = 0 _ ( ) for < 0 with 1. 0 +1.0 and 0 < 2 the look - up table b ( ) of the tmc429 enfolds a quarter period ( 0 < 6 ) only. th is quarter period is expanded to a full period ( 0 < 2 ) and the phase shifted companion function value b @ f 6 is added automatically by the tmc429 during operation. so, to reach a function value ( ) , one automatically gets a pair of function values { b ( ) ; 6 } respectively {sin ( m ); cos ( m )}. this automatic expansion of the tmc429 functionality C primar il y provided for sine cosine microstepping b ( ) = sin( m ) C also works fine with other microstep wave forms f . x 0 4 2 2 4 3 ) ( f 2 y up to 64 microsteps 1 full step up to 64 micro steps within a quadrant 1 full step 2 1 figure 11. 3 microstep enhancement by introduction of a shape function
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 66 www.trinamic.com the shape parameter selects one of three functions: (respectively a superposition of two of them) - ( ) - ( ) - ( ) the shape parameter = 0 selects the function b ( ) which is the sine function sin( ) as used for sine cosine microstepping. one gets the unit circle (r=1.0) by transformation to cartesian coordinates {y = sin( ); x = cos( )} as outlined in figure 11.3 . shape parameter 1 = +1.0 results in a box. shape parameter 1 = - 1.0 results in a rhomb. other values result in something betwe en a box and a circle respectively something between a circle and a rhomb. the data values u ( ) of the look - up table range from 0 to 63 and the argument i ranges also from 0 to 63. in the following, natural angles (radians) ranging from ( 0 < 2 ) are used for the description. the three functions for superposition controlled by the shape parameter 1 are b ( ) = 4 2 if 0 < 4 1 2 if 4 b ( ) = sin ( ) b ( ) = 2 all together, these three functions are combined to form the function b ( ) = ( ) + [ ( ) ( ) ] for > 0 ( ) for = 0 ( ) + [ ( ) ( ) ] for < 0 the shape pa rameter 1 selects the type of function and it also provides a continuous transition between circle and box respectively circle and rhomb. to estimate, what function is best for a given type of stepper motor, try microstepping based on different shape param eters 1 by downloading different microstep tables on - the - fly into the tmc429 during motion of a stepper motor. for the calculation of data for the microstep look - up table replace m o m i ranging from 0 to s /2 for the quarter period by = 2 64 = { 0,1, 2,3, , 63 } the amplitude of the shape function b ( ) has to be limited to the range of 0.0 to 1.0 respectively to the range of 0 to 63 for the on - chip ram. a fourier synthesis or an experimentally optimized wave is an option. sometimes ev en a small change like a zero offset is beneficial.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 67 www.trinamic.com 12 running a motor 12.1 getting started for starting a motor proceed as follows: 1. write the stepper motor driver datagram configuration into the ram area. (spi mode only) 2. initialize the m icrostep look - up table lut when using microstepping. (spi mode only; not necessary for trinamic motor driver chips) 3. initialize the parameter lsmd , which is part of the global parameter register. (spi mode only) 4. set the velocity parameters v_min and v_max . 5. set the clock pre - divi ders pulse_div and ramp_div. 6. set the microstep resolution usrs . 7. set a_max with a valid pair of pmul and pdiv . 8. choose the ramp mode with ramp_mode register. 9. choose the reference switch configuration with ref_conf register . the reference switch inputs re f1, ref2, and ref3 should be pulled down to ground. use the ref_conf register. 10. now, the tmc429 runs a motor if you write either x_target or v_target , depending on the choice of the ramp mode. 12.2 running a motor with start - stop - speed in ramp_mode the tmc429 has an integrated automatic start - stop - speed mechanism. this can easily be realized by a simple command sequence. to start and stop with a speed v_start_stop different from zero, one has to proceed as follows: 1. set v_min := v_start_stop. 2. set ramp_mode. 3. s et x_target to desired target position. 4. set v_actual immediately with correct sign for v_actual to +v_min resp. C v_min , depending on the direction of positioning.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 68 www.trinamic.com 13 on - chip voltage regulator the on - chip voltage regulator delivers a 3.3 v supply for the chip core. the tmc429 provides two operational modes to operate in 5 v or in 3.3 v environments . for both operational modes one resp. two external capacitors are required. please keep all connections as short as possible! o perational mode operational mode necessary additional hardware 5 v - n external 1nf ceramic capacitor clock has to be connected between pin v5 and ground - an external 470nf ceramic capacitor has to be connected between the v33 pin and ground. 3.3 v an external 100nf ceramic capacitor is necessary only between pin v33 and ground. c haracteristics of th e on - chip voltage regulat or symbol parameter conditions min typ max unit vdd5reg supply voltage vdd5 5 v operational mode 4.5 5 5.5 v cblock block capacitor 5 v operational mode, x7r ceramic capacitor 100 nf vdd3reg supply voltage vdd3 3.3 v operational mode 2.9 3.3 3.6 v iccnlreg current consumption no load 50 100 a tsreg startup time no external capacitor connected 20 s tsregc startup time c_load = 470 1 3 3 1 33 33 33 4 4 2 3 1 33 470 nf * + 5 v 100 nf * copt pins named gnd and test have to be connected to ground as close as possible to the chip. . * capacitors should be placed as cloase as possible to the chip . sck _ s sdo _ s sdi _ s nscs _ s ref 2 ref 3 ref 1 test gnd sdi _ c nscs _ c sck _ c sdo _ c clk v 5 v 33 tmc429 + 3 . 3 v 100 nf * 3 . 3 v operation (cmos) in most cases the optional capacitor copt is not necessary. . tmc429 5 v operation (ttl) figure 13. 1 3 v operation (cmos) vs. 5 v operation (ttl)
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 69 www.trinamic.com 14 power - on reset the tmc429 is equipped with a static and dynamic reset with an internal hysteresis. the chip performs an automatic reset during power - on. if the power supply voltage falls below the threshold v on , an automatic power - on reset is performed. the power - on reset time t respor depends on the power - up time of the on - chip voltage regulator. c haracteristics of th e on - chip power - on - reset symbol parameter min typ max unit vdd power supply range 3.0 3.3 3.6 v temp temperature - 55 25 125 c v op reset on/off hysteresis 0.80 v v off reset off 1.58 2.13 2.85 v v on reset on 1.49 1.98 2.70 v t respor reset time of on - chip power - on - reset 2.14 3.31 5.52 s static dynamic t respor v off v on v op 0 v off v on v op 0 figure 14. 1 operating principle of the power - on - reset
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 70 www.trinamic.com 15 absolut e maximum ratings the maximum ratings may not be exceeded under any circumstances. operating the circuit at or near more than one maximum rating at a time for extended periods shall be avoided by application design. symbol parameter conditions min max unit v dd3 dc supply voltage voltage at pin v33 in 3.3v mode - 0.3 3.6 v v i3 dc input voltage, 3.3 v i/os - 0.3 v dd3 + 0.3 v v o3 dc output voltage, 3.3 v i/os - 0.3 v dd3 + 0.3 v v dd5 dc supply voltage voltage at pin v5 - 0.3 5.5 v v i5 dc input voltage, 5v i/os continuous dc voltage - 0.3 v dd5 + 0.3, 5.5 max v v o5 dc output voltage, 5v i/os continuous dc voltage - 0.3 v dd5 + 0.3, 5.5 max v v esd esd voltage pad cells are designed to resist esd voltages according to human body model according to mil - std - 883, with r c = 1 C 10 m? , r d = 1.5 k ? , and c s = 100 pf, but it cannot be guaranteed. 16 electrical characteristics 16.1 power dissipation general dc characteristics symbol parameter conditions min typ max unit i sc32mhz supply current f = 32 mhz at tc = 25c 15 ma i sc16mhz supply current f = 16 2 1 42 2 ( ) 4 4 2 12 2 2 2 1
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 71 www.trinamic.com 16.2 dc characteristics dc characteristics contain the spread of values guaranteed within the specified supply voltage range unless otherwise specified. a device with typical values will not leave min/max range within the full temperature range. general dc characteristics symbol parameter conditions min typ max unit ilc input leakage current - 10 10 a cin input capacitance 7 pf lil input with pull up v in = 0v (ref1r, ref2r, ref3r) - 110 - 30 - 5 a dc characteristics for 3.3v supply mode symbol parameter conditions min typ max unit v dd3 dc supply voltage 3.0 3.3 3.6 v v i3 dc input voltage 0 v dd3 v v il3 low level input voltage pin test only 0 0.3 x v dd3 v v ih3 high level input voltage pin test only 0.7 x v dd3 v dd3 + 0.3 v v lth3 low level input voltage threshold all inputs except test 0.9 1.2 v v hth3 high level input voltage threshold all inputs except test 1.5 1.9 v v hys3 schmitt - trigger hysteresis 0.4 0.7 v v ol3 low level output voltage i ol = 0.3 1 3 i oh = 0.3 v dd3 C 0.1 v v ol3 low level output voltage i ol = 2 4 3 2 3 4 ripple on v dd3 has to be taken into account when measuring thresholds and hysteresis. dc characteristics for 5v supply mode symbol parameter conditions min typ max unit v dd5 dc supply voltage 4.5 5 5.5 v v i5 dc input voltage 0 v dd5 v v il5 low level input voltage pin test only 0 0.3 x v dd5 v v ih5 high level input voltage pin test only 0.7 x vdd 5 v dd5 + 0.3 v v lth5 low level input voltage threshold all inputs except test, v dd5 =5v 0.9 1.2 v v hth5 high level input voltage threshold all inputs except test, v dd5 =5v 1.5 1.9 v v hys5 schmitt - trigger hysteresis 0.4 0.7 v v ol5 low level output voltage i ol = 0.3 1 i oh = 0.3 v dd5 C 0.1 v v ol5 low level output voltage i ol = 4 4 4 4
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 72 www.trinamic.com 16.3 timing characteristics general timing parameters (tmc429 with emi optimized output drivers) symbol parameter conditions min typ max unit f clk operation frequency f clk = 1 / t clk 0 16 32 mhz t clk clock period r ising edge to r ising edge of clk 31.25 t clk_l t clk_h t clk t su t pd 90 % 10% 50% 50% t hd t fall t rise clk output figure 16. 1 general timing parameters
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 73 www.trinamic.com 18 package machanical data the tmc429 is available within three packages: qfn32, sop24, and ssop16 18.1 tmc429 - li / qfn32 18.1.1 dimensional drawings attention: drawings not to scale. figure 18. 1 dimensional drawings of qfn32 d imensions of package qfn32 parameter ref min nom max total thickness a 0.80 0.85 0.90 standoff a1 0.00 0.035 0.05 mold thickness a2 - 0.65 0.67 lead frame thickness a3 0.203 lead width b 0.2 0.25 0.3 body size x d 5.0 body size y e 5.0 lead pitch e 0.5 exposed die pad size x j 3.2 3.3 3.4 exposed die pad size y k 3.2 3.3 3.4 lead length l 0.35 0.4 0.45 package edge tolerance aaa 0.1 mold flatness bbb 0.1 coplanarity ccc 0.08 lead offset ddd 0.1 exposed pad offset eee 0.1 18.1.2 package code device package temperature range code/ marking tmc429 qfn32 (rohs) - 40 to +105c tmc429 - li
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 74 www.trinamic.com 18.2 tmc429 - pi24 / sop24 18.2.1 dimensional drawings attention: drawings not to scale. 1 2 3 h e e d a a 1 h x 45 b h x 45 a 2 c l top view side view 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 n = 24 24 end view figure 18. 2 dimensional drawings sop24, 300 mils d imensions of p ackage sop24, 300 mils symbol dimensions in millimeters dimensions in inches min typ max min typ max a 2.35 2.65 0.0926 0.1043 a1 0.1 0.3 0.004 0.0118 a2 b 0.33 0.51 0.013 0.02 c 0.23 0.32 0.0091 0.0125 d 15.2 15.6 0.5985 0.6141 e 7.4 7.6 0.2914 0.2992 e 1.27 best case 0.05 best case h 10 10.65 0.394 0.419 h 0.25 0.75 0.01 0.029 l 0.4 1.27 0.016 0.05 n 24 24 0 18.2.2 package code device package temperature range code/ marking tmc429 sop24 (rohs) - 40 to +105c tmc429 - pi24
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 75 www.trinamic.com 18.4 tmc429 - i / ssop16 18.4.1 dimensional drawings attention: drawings not to scale. h e h x 45 1 2 3 16 8 9 e d a a 1 h x 45 a 2 l with plating b 1 c 1 c b base metal top view side view c b 4 5 6 7 15 14 13 12 11 10 end view lead (side view) n=16 s figure 18. 3 dimensional drawings ssop16, 150 mils, 0.635mm (0.025 inch) pitch d imensions of p ackage ssop16, 150 mils symbol dimensions in millimeters dimensions in inches min typ max min typ max a 1.55 1.63 1.73 0.061 0.064 0.068 a1 0.10 0.15 0.25 0.004 0.006 0.0098 a2 1.40 1.47 1.55 0.055 0.058 0.061 b 0.20 0.30 0.008 0.012 b 1 0.20 0.25 0.28 0.008 0.010 0.011 c 0.18 0.25 0.007 0.010 c 1 0.18 0.20 0.23 0.007 0.008 0.009 b 0.20 0.25 0.31 0.008 0.010 0.012 c 0.19 0.20 0.25 0.0075 0.008 0.0098 d 4.80 4.93 4.98 0.189 0.194 0.196 e 3.91 best case 0.154 best case e 0.635 best case 0.025 best case h 6.02 best case 0.237 best case h 0.25 0.33 0.41 0.010 0.013 0.016 l 0.41 0.635 0.89 0.016 0.025 0.035 n 16 16 s 0.051 0.114 0.178 0.0020 0.0045 0.0070 0 5 8 0 5 8 18.4.2 package code device package temperature range code/ marking tmc429 ssop16 (rohs) - 40 to +105c tmc429 - i
tmc429 datasheet (rev. 2.0 4 / 201 5- jun - 03) 76 www.trinamic.com 19 marking p roduct n ame TMC429-I package ssop16 C 150 mils date code wwyy (week ww and year yy) lot number identifier llll logo no zoomed size TMC429-I trinamic wwyyllll p roduct n ame tmc429- li package qfn32 5mm * 5mm date code wwyy (week ww and year yy) lot number identifier llll logo yes zoomed size trinamic tmc429-li wwyy llll p roduct n ame tmc429- pi24 package sop24 C 300 mils date code wwyy (week ww and year yy) lot number identifier llll logo yes zoomed size tmc429-pi24 trinamic wwyy llll
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 77 www.trinamic.com 20 compatibility information: tmc429 and tmc428 the tmc429 is the 100% functional and pin compatible successor of the tmc428. the tmc429 can replace a tmc428 in existing hardware / software environments. there are some additional functions of the tmc429 which are mapped in register address ranges that w ere indicated reserved addresses for later versions. when these additional registers of the tmc429 are not accessed , the tmc429 behaves identically as a tmc428. registers, which are added in the tmc429, are labeled with _429 (e.g. register if_configuration_429 ). the tmc429 has a step/direction interface that perfect ly fits to the trinamic stepper motor driver family tmc260, tmc261, and tmc262. the tmc429 has a higher clock frequency range than the tmc428: - the tm c428 can be clocked up to 16mhz. - t he tmc429 can be clocked with up to 32mhz. 20.1 signal descriptions: tmc428 vs. tmc429 please note, that the step/dir interface of the tmc429 is not mentioned in this section because elder tmc428 applications always use spi interface. all pin functions necessary for replacing the tmc428 by the tmc429 are described in this table. pin tmc429 pin tmc428 ssop16 sop24 tmc428 sop24 tmc429 in/out description reset - - - - internal power - on reset clk 5 7 7 i clock input nscs_c 6 9 9 i low active spi chip select input driven from c sck_c 7 10 10 i serial data clock input driven from c sdi_c 8 11 11 i serial data input driven from c nint_sdo_c sdo_c / nint 9 14 14 o serial data output to c input / multiplexed ninterrupt output if communication with c is idle (resp. nscs_c = 1) sdo_c will never be high impedance, but this function can be added with a single gate 74hct1g125 (see figure 20.1 ). the tmc429 is equipped with an additional pin named sdoz_c which becomes high impedance when nscs_c=1. nscs_s_s2 nscs_s 12 17 17 o spi chip select signal to stepper motor driving chain nscs2_s3 nscs2 - 18 18 o spi chip select signal nscs3_d3 nscs3 - 19 19 o spi chip select signal sck_s_d1 sck_s 11 16 16 o serial data clock output to spi stepper motor driver chain sdo_s_s1 sdo_s 10 15 15 o serial data output to spi stepper motor driver chain sdi_s_d2 sdi_s 16 23 23 i serial data input from spi stepper motor driver chain (p ull - up/ - down resistor at sdi_s avoids high impedance; sdi_s input is the power - on default) ref1 1 2 2 i reference switch input 1 no internal pull - up r ref2 2 3 3 i reference switch input 2 no internal pull - up r ref3 3 4 4 i reference switch input 3 no internal pull -up r v5 13 5, 20 5, 20 +5v supply / +3.3v supply v33 14 21 21 470nf ceramic capacitor pin / +3.3v supply gnd 15 8, 22 8, 22 ground
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 78 www.trinamic.com pin tmc429 pin tmc428 ssop16 sop24 tmc428 sop24 tmc429 in/out description test 4 6 6 i must be connected to gnd as close as possible to the chip n.c. - 1, 12, 13, 24 - - not connected pins poscmp n.c. - n.c. 1 n.c. / o position compare output for sop24 / output for pos_comp function (tmc429 only) sdoz_c - n.c. 12 o / z sdoz_c becomes high impedance (z) when nscs_c=1 / the nint signal is not mapped to sdoz_c pin / the tmc429 provides a register for configuration of t he pin nint_sdo_c to give the nint signal directly without multiplexing . refr1 - n.c. 24 i reference switch right 1 input only available for tmc429 in sop24 package; internal pull - up r refr2 - n.c. 13 i reference switch right 2 input only available for tmc429 in sop24 package; internal pull - up r note when replacing a tmc428 in sop24 package by a tmc429 in sop24 package on an existing pcb make sure that the pins 1 and 12 are not connected on the pcb. these pins are outputs for the tmc429 in sop24 package. the tmc428 - i in ssop16 can be replaced by a tmc429 - i without restrictions. 20.2 tmc428 sdo_c output sck _ s sdo_s sdi_s nscs_s ref2 ref3 ref1 test gnd clk v5 v33 tmc429 sck_c sdi_c nscs_c sdoz_c sck_c sdi_c nscs_c sdoz_c nint_sdo_c can be configured as non-mulitplexed interrupt output nint_sdo_c nint sck_s sdo_s sdi_s nscs_s ref2 ref3 ref1 test gnd clk v5 v33 tmc428 sck_c sdi_c nscs_c sdo_c 74hct1g125 sck_c sdi_c nscs_c sdoz_c nint optional multiplexed interrupt output / hint: disable c interrupt input during spi access while nscs_c is low figure 20. 1 tmc428 sdo_c tristate output using a single gate 74hct1g125. the tmc429 has a dedicated tristate output ( sdoz_c ). nint_sdo_c can be switched to nint. 20.3 unused addresses 20.3.1 unused address (idx=%1111) reading the register gives back the actual status bits and 24 dat a bits set to 0. writing to this register has no effect for the tmc428. this register address (idx=%1111) within each stepper motor register block {smda=%00, %01, %10} is unused for the tmc428. 20.3.2 un used addresses (jdx={%0100, %0101, %0110, %1001}) there are unused addresses within the address range of the global parameter registers. access to these addresses has no effect for the tmc428. however, access should be avoided, because this address space m ay be used for future devices. for the tmc429, the global registers ad addresses jdx={%0100, %0101, %0110, %1001}) are used for tmc429 specific function. some bits of the clk2_div (jdx=%1111}) are used for the timing configuration in step/direction mode of the tmc429. for the tmc429 some of the un - used addresses are used for additional registers of the tmc429. additional registers of the tmc429 are named as _429 to indicate that these have tmc429 specific functions that are not available for the tmc428.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 79 www.trinamic.com 20.4 general timing parameters the tmc429 has improved values when compared to tmc428. in this table modified timing values are summarized. general timing parameters (tmc428 with emi optimized output drivers) symbol parameter conditions min typ max unit f clk operation frequency f clk = 1 / t clk 0 16 32 mhz t clk clock period raising edge to r ising edge of clk 31.25
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 80 www.trinamic.com 21 disclaimer trinamic motion control gmbh & co. kg does not authorize or warrant any of its products for use in life support systems, without the specific written consent of trinamic motion control gmbh & co. kg. life support systems are equipment intended t o support or sustain life, and whose failure to perform, when properly used in accordance with instructions provided, can be reasonably expected to result in personal injury or death. information given in this data sheet is believed to be accurate and rel iable. however no responsibility is assumed for the consequences of its use nor for any infringement of patents or other rights of third parties which may result from its use. specifications are subject to change without notice. all trademarks used are property of their respective owners. 22 esd sensitive device the tmc429 is an esd - sensitive cmos device and sensitive to electrostatic discharge. take special care to use adequate grounding of personnel and machines in manual handling. after soldering the devices to the board, esd requirements are more relaxed. failure to do so can result in defects or decreased reliability. pad cells are designed to resist esd voltages corresponding to human body model (mil - std - 883, with r c = 1 C 10 m ? , r d = 1.5 k ? , and c s = 100 pf). note: in a modern smd manufacturing process, esd voltages well below 100v are standard. a major source for esd is hot - plugging the motor during operation.
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 81 www.trinamic.com 23 table of figures figure 1.1 tmc429 functional block diagra m ................................................................................................................ 4 figure 1.2 application example using step/dir driver interface ............................................................................. 5 figure 1.3 application example using spi driver interface ...................................................................................... 5 figure 4.1 tmc429 pin out ............................................................................................................................................... 11 figure 5.1 tmc429 within qfn32 package ................................................................................................................... 13 figure 5.2 tmc429 / tmc26x outline for configuration via spi and step/dir for motion ............................ 13 figure 5.3 tmc429 application environment with tmc429 in ssop16 package ............................................... 14 figure 5.4 usage of drivers without serial data output (sdo) with tmc429 in sop24 or in qfn32 packages ................................................................................................................................................................................ 14 figure 6.1 timing diagram of the serial c interface .............................................................................................. 1 6 figure 6.2 the tmc429 has a high impedance pin sdoz_c. the nint_sdo_c can be configured as non multiplexed interrupt output nint if required. .......................................................................................................... 17 figure 8.1 velocity ramp parameters and velocity profiles .................................................................................... 24 figure 8.2 target posit ion calculation, ramp generator, and pulse generator ................................................. 28 figure 8.3 proportionality parameter p and outline of velocity profile(s) ......................................................... 30 figure 8.4 left switch and right switch for reference search and automatic stop function ....................... 33 figure 8.5 example of status bit mapping for a chain of three tmc246 or tmc249 ...................................... 40 figure 8.6 cover datagram example with 7 bits covering 7 bits of a 48 bit datagram ................................ 41 figure 9.1 tmc429 - li has three right reference inputs. tmc429 - pi24 has two right reference inputs. .... 49 figure 9.2 reference switch configuration left - side - only for mot1r =0 (and refmux =0) .................................. 50 figure 9.3 reference switch configuration two - one - zero for mot1r =1 (and refmux =0) .................................. 50 figure 9.4 reference switch multiplexing with 74hc157 (refmux=1) ................................................................... 51 figure 9.5 triple switch configuration left stop switch C reference switch C right stop switch ................ 51 figure 9.6 reference search ............................................................................................................................................. 52 figure 9.7 reference switch gateing for exact simultanous stepper motor start ........................................... 52 figure 10.1 step/dir timing ( en_sd = 1; step_half = 0) ............................................................................................. 53 figure 11.1 timing diagram of the serial stepper motor driver interface ......................................................... 54 figure 11.2 serially transmitted control and status signals between tmc429 and driver chain ................ 58 figure 11.3 microstep enhancement by introduction of a shape function ....................................................... 65 figure 13.1 3 v operation (cmos) vs. 5 v operation (ttl) ..................................................................................... 68 figure 14.1 operating principle of the power - on - reset ........................................................................................... 69 figure 16.1 general timing parameters ........................................................................................................................ 72 figure 18.1 dimensional drawings of qfn32 ............................................................................................................. 73 figure 18.2 dimensional drawings sop24, 300 mils ............................................................................................... 74 figure 18.3 dimensional drawings ssop16, 150 mils, 0.635mm (0.025 inch) pitch ....................................... 75 figure 20.1 tmc42 8 sdo_c tristate output using a single gate 74hct1g125. the tmc429 has a dedicated tristate output (sdoz_c). nint_sdo_c can be switched to nint. .................................................... 78
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 82 www.trinamic.com 24 revision history version date author ll C lars larsson bd C bernhard dwersteg sd C sonja dwersteg description 1.00 2009- dec - 08 ll - tc2 datasheet re 1 based on tc2 datasheet re 23 / december 1 2 - corrections: p = a_max / ( 128 * 2^( pulse_div C ramp_div ) ) p = a_max / ( 128 * 2^( ramp_div - pulse_div ) ); 2010- may - 05 ll - fn32 pacage pinning added - hint added concerning changing of pluse_div while velocity_mode or hold_mode that might force am internal step pulse depending on the current position. - dil2 pacage of tc2 remoed 21 - g - 5 ll - pin out gnd 25 and nc 32 added for fn32 pacag e - pinning table updated with tmc428 sop24 package variant. - hints added for new functions of the tmc429. - section 20.3 unused addresses - unused address (idx=%1111) , p. 78 and section 8.1.16 ustep_count_429 (idx=%1111) modified / added because this register was unused for the tmc428 but is a read / write register for the tmc429. 2010- aug - 26) ll - sdo_c renamed to iint_sdc_c at pacage drawings - spi configuration outline added 21 - sep - 1 ll - figure 21 tc2 sdo_c tristate output using a single gate hct1g125 the tc2 has a dedicated tristate output sdoz_c nint_sdo_c can be switched to nint - description of if_configuration_429 finalized. - step/direction timing figu re and description added (section 10 step/dir , page 53 ). - short description of differences between tmc428 vs. tmc429. - section 12.2 running a motor with start - stop - speed in ramp_mode , page 67 new. 1.01 2010- oct - 10 ll - aring section 1 p updated - timing parameter updated 12 21 - nov - 1 ll pinning of ssop1 pin 1 pacag e ariant corrected 13 21 - nov - 5 ll - tc2 drawings figure 21 figure 2 figure 3 figure 1 figure figure updated concerning tc2 / tc2 - feature list updated concerning step direction interfac e 1 21- nov - 11 ll - section 1 step/dir page 53 euation tsteps corrected 15 21 - dec - ll - position compare control register pos_comp and associated output poscmp labelling unified - tc2 changed to tc2 in text if necessar 211- pr - 211- - 1 211- g - 2 211- dec - 15 ll - preliminar remoed and ersion date updated no changes within the document itself - hint concerning microstep frequency added in section 10 , p. 53. - post address updated. - hint concerning current scaling at rest added . - typical current isc32mhz added and symbol isc4mhz429 corrected/changed to isc8mhz429. - p ower - on default initialiation of the spi drier chain for
tmc429 datasheet (rev. 2.0 4 / 201 5 - jun - 03) 83 www.trinamic.com version date author ll C lars larsson bd C bernhard dwersteg sd C sonja dwersteg description 2012- jan - 19 tmc236/tmc239/tmc246/tmc249 spi stepper motor chain updated . - tmc429 power - on reset (por) default values added. - hint concerning power - on defaults of sine wave table added. 1.06 2012 - jan - 27 2012- mar - 28 2012- may - 22 ll - section 122 running a otor with start - stop - speed in ramp_mode item set _trget : v_strt_stop corrected to set _trget to desired position initialiation of on - chip r b c after power - on updat ed - hint concerning frequency of spi clock sck relative to tmc429 clock fclk added . - updated concerning dimensioning drawing at rising edge of direction signal (signal shape itself was correct). 1.07 2012 - aug - 01 sd - section corrected: smda 1 2 212- dec - 3 sd mended datasheet ersion with new design seeral changes 21 212- dec - 1 p general dc characteristics changed 22 213 - nov - sd - pplication example in chapter 52 updated - ustep_count_429 description updated - value ranges for x_target and x_actual updated (signed and unsigned are possible). - chapter 121 serial c interface corrected 23 215 - r - 1 d - _ctl is signed 12 bit p 22 2 215 - n - 3 d corrected meaning of rs bits in spi status information field 25 references [tmc429+26x - eval] tmc429+26x - eval manual / evaluation board for s/d chipset (tmc429with tmc260, tmc261, tmc262 and tmc424) [tmc429+tmc24x - eval] tmc429+tmc24x - eval manual / evaluation board for spi chipset (tmc429, tmc246, and tmc249)


▲Up To Search▲   

 
Price & Availability of TMC429-I

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X